Author Topic: Cannot build on Ubuntu 6.06 (64 bit)  (Read 9923 times)

Offline _teo_

  • Multiple posting newcomer
  • *
  • Posts: 27
Cannot build on Ubuntu 6.06 (64 bit)
« on: October 20, 2006, 12:59:16 pm »
Hello *,

First of all, I'm new here and if this is wrong place for my questions, please let me know which is better suited.

I tried last night (>6 hours) to build CB on my system and I couldn't. I use Ubuntu 6.06 - 64 bit version.

All prerequisites are met. I followed the "Installing Code::Blocks from source on Linux" wiki page. The wxGTK library is available in repositories. It says that it is version 2.6-0. I installed wx-common as well.

So, I run bootstrap and configure without errors. But make fails. Some problems are listed below:
- wxHIDE_READONLY - I just commented that out
- the compiler complains that the Numpad keys are defined twice (or three times) - I just commented out duplications
- at some places CenterOnScreen function wasn't found - well it isn't that important (commented out)
- some functions were with different parameter types and return types - mainly I had to add unsigned
- wxDynamicCast couldn't cast wxWindow* to const wxFrame* (static_cast is involved) - I just removed that parts, although this could lead to misbehavior later
- and at the end I gave up when I hit the WX_DEFINE_ARRAY macro...

My questions are:
1) which wxWidgets library do you use?
2) is there anything else that I should take into account while building?

I really don't believe that one should hit that many problems while building CB. I must have done something wrong.

Any help is appreciated.
Teo

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7056
    • My Best Post
Re: Cannot build on Ubuntu 6.06 (64 bit)
« Reply #1 on: October 20, 2006, 02:11:57 pm »
wxHIDE_READONLY - I just commented that out
- the compiler complains that the Numpad keys are defined twice (or three times) - I just commented out duplications

The above two errors imply that you are using 2.7 not 2.6 version of wxWidgets. Please verify the version being used. Other than that I can't help you, since I use windows.

Codeblocks does not work with 2.7 versions of wxWidgets. The recommended is 2.6.3 with patch 2, I think it will work with 2.6.2 version of wxWidgets. This is under windows not sure if it applies to Linux etc.

I would look at this link and see if it helps
http://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux#wxWidgets_build

Tim S
« Last Edit: October 20, 2006, 02:19:46 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline _teo_

  • Multiple posting newcomer
  • *
  • Posts: 27
Re: Cannot build on Ubuntu 6.06 (64 bit)
« Reply #2 on: October 20, 2006, 03:17:59 pm »
Good hit, Tim. I tried to compile 2.7 first (this is the problem). Later I found the wiki page you are referring to and followed instructions.

Perhaps I failed to uninstall the 2.7 version. I typed "make uninstall" as root in same directory where I compiled it before and it said that there is nothing to do. So, I continued with the version in repositories. Any idea on how to properly uninstall 2.7?

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7056
    • My Best Post
Re: Cannot build on Ubuntu 6.06 (64 bit)
« Reply #3 on: October 20, 2006, 03:56:13 pm »
I think you are going to need a Linux person to help you. I am still try to figure out how to install GCC on Linux. So, I can't help you. I just recognized the errors because I am trying to build C::B with 2.7 under windows.
Note: The error is caused under windows because the wrong include files are being used. It is not a library/so issue. So, I would look for the include files for wxWidgets 2.7 and see if deleting them help or at least rename the top folder.

Tim S
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline rjmyst3

  • Multiple posting newcomer
  • *
  • Posts: 117
    • wxFormBuilder
Re: Cannot build on Ubuntu 6.06 (64 bit)
« Reply #4 on: October 20, 2006, 04:23:14 pm »
_teo_,
 I would expect this is a wx-config issue.
 Execute
Code: [Select]
wx-config --cflagsin the terminal. It should dump compiler flags used with gcc. Look for one starting with -I to determine which version of wxWidgets you're compiling with.
For example:
Code: [Select]
-I/usr/lib/wx/include/gtk-unicode-release-2.6tells me that I'm using version 2.6, whereas
Code: [Select]
-I/opt/wx/2.7/lib/wx/include/gtk2-unicode-release-2.7would tell me that I'm using version 2.7.

If wx-config is returning the wrong version, then you probably have more than one copy of wx-config on your system, and you need to change the default to the one you'd like to use.

In a terminal, exectue
Code: [Select]
sudo update-alternatives --config wx-configThis should show you a list of alternatives for wx-config. For me, it reports:
Code: [Select]
  Selection       Alternatives
----------------------------------------------------------
       1             /usr/lib/wx/config/gtk2-unicode-release-2.6
       2             /opt/wx/2.7/bin/wx-config
So I would choose 1 to use the 2.6 version for building codeblocks.

After I'm done building codeblocks, I would run update-alternatives again to switch back to 2.7, for use with compiling my own projects.

Does that help?

Offline _teo_

  • Multiple posting newcomer
  • *
  • Posts: 27
Re: Cannot build on Ubuntu 6.06 (64 bit)
« Reply #5 on: October 20, 2006, 04:38:42 pm »
Note: The error is caused under windows because the wrong include files are being used. It is not a library/so issue. So, I would look for the include files for wxWidgets 2.7 and see if deleting them help or at least rename the top folder.
Ok, I will check include path and post here my observations. Thanks anyway.

I am still try to figure out how to install GCC on Linux.
Btw, which distribution do you use? It should be fairly easy task to install compiler and rest tools for C/C++ development.

Offline _teo_

  • Multiple posting newcomer
  • *
  • Posts: 27
Re: Cannot build on Ubuntu 6.06 (64 bit)
« Reply #6 on: October 20, 2006, 04:42:05 pm »
_teo_,
 I would expect this is a wx-config issue.
This sounds logical (like Java Runtime). I'll give it a try later today and will post here (I am at work).

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7056
    • My Best Post
Re: Cannot build on Ubuntu 6.06 (64 bit)
« Reply #7 on: October 20, 2006, 05:01:26 pm »
Btw, which distribution do you use? It should be fairly easy task to install compiler and rest tools for C/C++ development.


I was trying Kubuntu but gave up to many problems and not enough directions, I am trying Ubuntu 6.06 Dapper release but can't get my dialup to work. And the Package software says GCC is installed but GCC --version says it can't find the command. I plan to build a different computer out of the spare parts I have; because, I think the dialup is a hardware issue. Also, thinking about trying VM version of Ubuntu under windows. I am starting to think I may have to wait till I get broadband connection before I can get Linux to work.

Tim S
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline _teo_

  • Multiple posting newcomer
  • *
  • Posts: 27
Re: Cannot build on Ubuntu 6.06 (64 bit)
« Reply #8 on: October 20, 2006, 05:55:44 pm »
I was trying Kubuntu but gave up to many problems and not enough directions, I am trying Ubuntu 6.06 Dapper release but can't get my dialup to work.
www.linmodems.org - I had troubles with my modem as well (SuSE), but I switched finally to DSL. I had no chance to use that modem.

And the Package software says GCC is installed but GCC --version says it can't find the command.
Well, I am sure you know about www.ubuntuforums.org. Have you asked there about GCC? I got it from repositories.

I plan to build a different computer out of the spare parts I have; because, I think the dialup is a hardware issue. Also, thinking about trying VM version of Ubuntu under windows. I am starting to think I may have to wait till I get broadband connection before I can get Linux to work.
I am not a geek and probably cannot help you further, but if I can, you are welcome.

Offline rjmyst3

  • Multiple posting newcomer
  • *
  • Posts: 117
    • wxFormBuilder
Re: Cannot build on Ubuntu 6.06 (64 bit)
« Reply #9 on: October 20, 2006, 07:12:53 pm »
And the Package software says GCC is installed but GCC --version says it can't find the command.

Commands are case-sensitive in linux.

try:
gcc --version

Also you can get every thing to need to build by installing the build-essential package.
sudo apt-get install build-essential

Offline TheTuxKeeper

  • Regular
  • ***
  • Posts: 293
  • daniel2000
Re: Cannot build on Ubuntu 6.06 (64 bit)
« Reply #10 on: October 20, 2006, 07:17:13 pm »
Btw, which distribution do you use? It should be fairly easy task to install compiler and rest tools for C/C++ development.


I was trying Kubuntu but gave up to many problems and not enough directions, I am trying Ubuntu 6.06 Dapper release but can't get my dialup to work. And the Package software says GCC is installed but GCC --version says it can't find the command. I plan to build a different computer out of the spare parts I have; because, I think the dialup is a hardware issue. Also, thinking about trying VM version of Ubuntu under windows. I am starting to think I may have to wait till I get broadband connection before I can get Linux to work.

Tim S
Did you really type in GCC --version ? If yes, you have to type gcc --version (lowercase "gcc", linux handles everything casesensitive). Also make sure that you installed g++, too.(I've been too slow :? ). Don't forget the package zip or it won't build either.

For your problem with the modem, go to the linmodems page or ask in www.ubuntuforums.org . Please also post the output of /sbin/lspci (perhaps you have to run it as root) in the forum (or first search in google with the exact modem info ;)).
You can pm me the output. I can search a bit for you, if you don't find the right resources :)

Daniel
Nightly builds for openSUSE

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7056
    • My Best Post
Re: Cannot build on Ubuntu 6.06 (64 bit)
« Reply #11 on: October 20, 2006, 07:30:06 pm »
I will try it in lower case. But, I think I did do it in lower case.

I can't do this sudo apt-get install build-essential till I get a internet connection or is this on the install CD-ROM?

Tim S
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline _teo_

  • Multiple posting newcomer
  • *
  • Posts: 27
Re: Cannot build on Ubuntu 6.06 (64 bit)
« Reply #12 on: October 20, 2006, 10:38:21 pm »
rjmyst3, you are right. Both 2.6 and 2.7 were there. Now I am compiling CB and hope...  :)

Offline _teo_

  • Multiple posting newcomer
  • *
  • Posts: 27
Re: Cannot build on Ubuntu 6.06 (64 bit)
« Reply #13 on: October 20, 2006, 10:56:09 pm »
Yes!!! I got it working! And now the fun begins...  :D

Offline _teo_

  • Multiple posting newcomer
  • *
  • Posts: 27
Re: Cannot build on Ubuntu 6.06 (64 bit)
« Reply #14 on: October 20, 2006, 10:58:13 pm »
I can't do this sudo apt-get install build-essential till I get a internet connection or is this on the install CD-ROM?
build-essential tools are on the "alternate" install CD, which you can add to Synaptic