Author Topic: Doesn't build since rev 3050 (at least for MacOSX?)  (Read 7372 times)

bnilsson

  • Guest
Doesn't build since rev 3050 (at least for MacOSX?)
« on: October 14, 2006, 09:09:16 pm »
Dual 2.3GHz PowrPC G5
Mac OSX 10.4.8
wxWidgets 2.6.3

Hi!

The latest successful rev I have is 3050.
Lately I have got the following build problem:
....
/usr/bin/ld: Undefined symbols:
wxFlatNotebook::SetSelection(unsigned long)
wxFlatNotebook::SetGradientColorTo(wxColour const&)
wxFlatNotebook::SetGradientColorFrom(wxColour const&)
wxFlatNotebook::SetGradientColorBorder(wxColour const&)
wxFlatNotebook::GetSelection() const
collect2: ld returned 1 exit status
make[3]: *** [codeblocks] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all-recursive] Error 1


and it does not seem to go away by waiting and doing occasional "svn update"

Any suggestions?


Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Doesn't build since rev 3050 (at least for MacOSX?)
« Reply #1 on: October 14, 2006, 11:00:23 pm »
Did you try a full rebuild? (Or removed manually any *.o; *.a and *.gch files...?)
With regards, Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

bnilsson

  • Guest
Re: Doesn't build since rev 3050 (at least for MacOSX?)
« Reply #2 on: October 15, 2006, 01:11:44 pm »
I actually removed all and did a new svn checkout.
I patched from the wiki OSX install page

patch -p0 -i codeblocks-rev2970_pkgconfig.patch
patch -p0 -i codeblocks-rev2994_pluginslib.patch
patch -p0 -i codeblocks-appselfpath.patch
patch -p0 -i codeblocks-wxauigtk.patch
(two of the wiki patches I have found obsolete, so I did not apply these)

I did bootstrap and

./configure --enable-contrib --prefix=$HOME CXXFLAGS=-I/opt/local/include LDFLAGS=-L/opt/local/lib
and make.

I also tried without the patches above, but got the same result.


Offline afb

  • Developer
  • Lives here!
  • *****
  • Posts: 884
Re: Doesn't build since rev 3050 (at least for MacOSX?)
« Reply #3 on: October 15, 2006, 10:01:01 pm »
I'm attempting a build of rev 3090, will update the Wiki when complete.

Offline afb

  • Developer
  • Lives here!
  • *****
  • Posts: 884
Re: Doesn't build since rev 3050 (at least for MacOSX?)
« Reply #4 on: October 15, 2006, 10:23:31 pm »
I actually removed all and did a new svn checkout.

Did you also uninstall / remove all libraries, before doing the build ?
(i.e. "make uninstall clean make", or doing something similar to that)

There is a bug with the current build scripts that makes it prefer
linking to /usr/local/lib or $PREFIX/lib over the local libraries... :-(

http://forums.codeblocks.org/index.php?topic=4088.0

Offline afb

  • Developer
  • Lives here!
  • *****
  • Posts: 884
Re: Doesn't build since rev 3050 (at least for MacOSX?)
« Reply #5 on: October 15, 2006, 11:16:04 pm »
Lately I have got the following build problem:
....
/usr/bin/ld: Undefined symbols:
wxFlatNotebook::SetSelection(unsigned long)
wxFlatNotebook::SetGradientColorTo(wxColour const&)
wxFlatNotebook::SetGradientColorFrom(wxColour const&)
wxFlatNotebook::SetGradientColorBorder(wxColour const&)
wxFlatNotebook::GetSelection() const
collect2: ld returned 1 exit status

Reproduced. Looks like a wxMac issue.
« Last Edit: October 15, 2006, 11:43:25 pm by afb »

Offline afb

  • Developer
  • Lives here!
  • *****
  • Posts: 884
Re: Doesn't build since rev 3050 (at least for MacOSX?)
« Reply #6 on: October 15, 2006, 11:38:22 pm »
The issue seems to be that it is linking towards "wxFlatNotebookBase" while declaring "wxFlatNotebook".

Code
$ grep -r ZN14wxFlatNotebook12SetSelectionEm .
Binary file ./src/sdk/.libs/editorbase.o matches
Binary file ./src/sdk/.libs/editormanager.o matches
Binary file ./src/sdk/.libs/libcodeblocks.0.0.1.dylib matches
Binary file ./src/sdk/.libs/libcodeblocks.0.dylib matches
Binary file ./src/sdk/.libs/libcodeblocks.dylib matches
Binary file ./src/sdk/.libs/messagemanager.o matches
Binary file ./src/sdk/.libs/projectmanager.o matches
Binary file ./src/src/app.o matches
Binary file ./src/src/main.o matches

Code
$ grep -r ZN18wxFlatNotebookBase12SetSelectionEm .
Binary file ./src/sdk/.libs/libcodeblocks.0.0.1.dylib matches
Binary file ./src/sdk/.libs/libcodeblocks.0.dylib matches
Binary file ./src/sdk/.libs/libcodeblocks.dylib matches
Binary file ./src/sdk/wxFlatNotebook/.libs/libwxflatnotebook.a matches
Binary file ./src/sdk/wxFlatNotebook/.libs/wxFlatNotebook.o matches

Code
$ echo __ZN14wxFlatNotebook12SetSelectionEm | c++filt
wxFlatNotebook::SetSelection(unsigned long)
$ echo __ZN18wxFlatNotebookBase12SetSelectionEm | c++filt
wxFlatNotebookBase::SetSelection(unsigned long)

Offline eranif

  • Regular
  • ***
  • Posts: 256
Re: Doesn't build since rev 3050 (at least for MacOSX?)
« Reply #7 on: October 15, 2006, 11:42:20 pm »
The class wxFlatNotebookBase is no longer exist ... check you header files and make sure that you are up to date.
Eran

Offline afb

  • Developer
  • Lives here!
  • *****
  • Posts: 884
Re: Doesn't build since rev 3050 (at least for MacOSX?)
« Reply #8 on: October 15, 2006, 11:46:48 pm »
Yup, had removed the old libs but had some old stray headers left.

Code
sudo rm -r /usr/local/include/codeblocks

It would be nice if the build scripts (i.e. autotools) could be fixed,
so that it looks in the local dirs before it looks in the system dirs... ?

It also fails to link if you have e.g. an unicode wx in $PREFIX and
a ansi wx in /usr/local, to name a common example that I run into

Moral: make sure to you remove all the objects, and headers too!

Offline afb

  • Developer
  • Lives here!
  • *****
  • Posts: 884
Re: Doesn't build since rev 3050 (at least for MacOSX?)
« Reply #9 on: October 15, 2006, 11:53:03 pm »
It also seems like "make clean" missed to clean up src/sdk/wxFlatNotebook/.libs ?

Offline afb

  • Developer
  • Lives here!
  • *****
  • Posts: 884
Re: Doesn't build since rev 3050 (at least for MacOSX?)
« Reply #10 on: October 16, 2006, 12:55:48 pm »
I eventually got rev3090 to build, but the new wxFlatNotebook doesn't work yet so I'm not releasing it.
Updated the Wiki by removing obsolete patches, and added references to new temporary workarounds...