aMule Forum
English => Compilation problems => Topic started by: ^marcell^ on September 06, 2010, 09:28:09 PM
-
Compiling the WebServer part of aMule fails with the following output:
make[4]: Betrete Verzeichnis '/home/marcell/aMule/svn/amule-dev/src/webserver/src'
g++ -g -W -Wall -Wshadow -Wundef -ggdb -fno-inline -fmessage-length=0 -pthread -I/usr/include/libpng12 -lpthread -L../../libs/common -L../../libs/ec/cpp -L/usr/lib -o amuleweb amuleweb-WebServer.o amuleweb-WebInterface.o amuleweb-WebSocket.o amuleweb-ExternalConnector.o amuleweb-OtherFunctions.o amuleweb-RLE.o amuleweb-NetworkFunctions.o amuleweb-LoggerConsole.o amuleweb-UPnPBase.o amuleweb-php_parser.o amuleweb-php_lexer.o amuleweb-php_syntree.o amuleweb-php_amule_lib.o amuleweb-php_core_lib.o -lec -lmulecommon -pthread -Wl,-Bsymbolic-functions -lwx_baseu_net-2.8 -lwx_baseu-2.8 -lbfd -liberty -lz -lpng12
../../libs/ec/cpp/libec.a(ECSpecialTags.o): In function `wxTransform2D::Transform(wxRect2DInt*) const':
ECSpecialTags.cpp:(.text._ZNK13wxTransform2D9TransformEP11wxRect2DInt[wxTransform2D::Transform(wxRect2DInt*) const]+0x89): undefined reference to `wxRect2DInt::operator=(wxRect2DInt const&)'
../../libs/ec/cpp/libec.a(ECSpecialTags.o): In function `wxTransform2D::InverseTransform(wxRect2DInt*) const':
ECSpecialTags.cpp:(.text._ZNK13wxTransform2D16InverseTransformEP11wxRect2DInt[wxTransform2D::InverseTransform(wxRect2DInt*) const]+0x89): undefined reference to `wxRect2DInt::operator=(wxRect2DInt const&)'
collect2: ld returned 1 exit status
make[4]: *** [amuleweb] Fehler 1
make[4]: Verlasse Verzeichnis '/home/marcell/aMule/svn/amule-dev/src/webserver/src'
When I change the line below in "config.status" it's working, but seems like it takes much longer to link/compile:
# old line
S["WX_LIBS"]="-pthread -Wl,-Bsymbolic-functions -lwx_gtk2u_adv-2.8 -lwx_gtk2u_core-2.8 -lwx_baseu_net-2.8 -lwx_baseu-2.8 "
# new line
S["WX_LIBS"]="`wx-config --libs`"
The output of "wx-config --libs" is:
-pthread -Wl,-Bsymbolic-functions -lwx_gtk2u_richtext-2.8 -lwx_gtk2u_aui-2.8 -lwx_gtk2u_xrc-2.8 -lwx_gtk2u_qa-2.8 -lwx_gtk2u_html-2.8 -lwx_gtk2u_adv-2.8 -lwx_gtk2u_core-2.8 -lwx_baseu_xml-2.8 -lwx_baseu_net-2.8 -lwx_baseu-2.8
The output of "wx-config --list" is:
Default config is gtk2-unicode-release-2.8
Default config will be used for output
Alternate matches:
base-unicode-release-2.8
What am I missing?
-
Not sure. Try removing the extra libs one by one until you find out which one causes the wxTransform2D error.
-
Which wx version are you using? I can compile fine with 2.8.11 (although recently I only compiled with debug enabled versions).
The problem is that libec.a (ECSpecialTags.o) has GUI references (which it shouldn't), but amuleweb is compiled with base only. The same error should show up when you try to compile amulecmd or amuled.
If you're trying to compile a modified source, make sure no GUI dependencies are introduced (even by a header inclusion).
On the other hand, maybe we should compile libec.a (and libcommon.a) with base only. You may try changing it in the respective Makefile.am files (don't forget autogen.sh & configure after the change).
-
Which wx version are you using?
2.8.10
The same error should show up when you try to compile amulecmd or amuled.
I get the same error for amulecmd, but not for amuled, which compiles/links just fine.
If you're trying to compile a modified source, make sure no GUI dependencies are introduced (even by a header inclusion).
The only changes are those regarding the AllCategoryFilter.
On the other hand, maybe we should compile libec.a (and libcommon.a) with base only. You may try changing it in the respective Makefile.am files (don't forget autogen.sh & configure after the change).
I am a total novice when it comes to the syntax of make-files. Is the change (.src/libs/ec/cpp/Makefile.am) below ok?
#old line
AM_CPPFLAGS = $(MULECPPFLAGS) -I$(top_srcdir)/src -I$(top_srcdir)/src/libs -I$(top_srcdir)/src/include $(WX_CPPFLAGS) $(ZLIB_CPPFLAGS)
#new line
AM_CPPFLAGS = $(MULECPPFLAGS) -I$(top_srcdir)/src -I$(top_srcdir)/src/libs -I$(top_srcdir)/src/include $(WXBASE_CPPFLAGS) $(ZLIB_CPPFLAGS)
-
The same error should show up when you try to compile amulecmd or amuled.
I get the same error for amulecmd, but not for amuled, which compiles/links just fine.
Interesting.
If you're trying to compile a modified source, make sure no GUI dependencies are introduced (even by a header inclusion).
The only changes are those regarding the AllCategoryFilter.
I guessed so.
On the other hand, maybe we should compile libec.a (and libcommon.a) with base only. You may try changing it in the respective Makefile.am files (don't forget autogen.sh & configure after the change).
I am a total novice when it comes to the syntax of make-files. Is the change (.src/libs/ec/cpp/Makefile.am) below ok?
#old line
AM_CPPFLAGS = $(MULECPPFLAGS) -I$(top_srcdir)/src -I$(top_srcdir)/src/libs -I$(top_srcdir)/src/include $(WX_CPPFLAGS) $(ZLIB_CPPFLAGS)
#new line
AM_CPPFLAGS = $(MULECPPFLAGS) -I$(top_srcdir)/src -I$(top_srcdir)/src/libs -I$(top_srcdir)/src/include $(WXBASE_CPPFLAGS) $(ZLIB_CPPFLAGS)
Yes.
-
Great, thanks. The changes are commited in SVN 10282. Compilation works now.