aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Author Topic: Can't compile aMule SVN version (webserver part)  (Read 4591 times)

^marcell^

  • Developer
  • Hero Member
  • *****
  • Karma: 28
  • Offline Offline
  • Posts: 524
Can't compile aMule SVN version (webserver part)
« on: September 06, 2010, 09:28:09 PM »

Compiling the WebServer part of aMule fails with the following output:
Code: [Select]
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:
Code: [Select]
# 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:
Code: [Select]
-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:
Code: [Select]
    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?
Logged

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5795
Re: Can't compile aMule SVN version (webserver part)
« Reply #1 on: September 06, 2010, 11:19:47 PM »

Not sure. Try removing the extra libs one by one until you find out which one causes the wxTransform2D error.
Logged

GonoszTopi

  • The current man in charge of most things.
  • Administrator
  • Hero Member
  • *****
  • Karma: 169
  • Offline Offline
  • Posts: 2685
Re: Can't compile aMule SVN version (webserver part)
« Reply #2 on: September 07, 2010, 09:10:02 PM »

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).
« Last Edit: September 07, 2010, 09:11:39 PM by GonoszTopi »
Logged
concordia cum veritate

^marcell^

  • Developer
  • Hero Member
  • *****
  • Karma: 28
  • Offline Offline
  • Posts: 524
Re: Can't compile aMule SVN version (webserver part)
« Reply #3 on: September 07, 2010, 10:10:12 PM »

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?
Code: [Select]
#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)
Logged

GonoszTopi

  • The current man in charge of most things.
  • Administrator
  • Hero Member
  • *****
  • Karma: 169
  • Offline Offline
  • Posts: 2685
Re: Can't compile aMule SVN version (webserver part)
« Reply #4 on: September 07, 2010, 11:22:10 PM »

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?
Code: [Select]
#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.
Logged
concordia cum veritate

^marcell^

  • Developer
  • Hero Member
  • *****
  • Karma: 28
  • Offline Offline
  • Posts: 524
Re: Can't compile aMule SVN version (webserver part)
« Reply #5 on: September 07, 2010, 11:27:23 PM »

Great, thanks. The changes are commited in SVN 10282. Compilation works now.
Logged