aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Author Topic: Amulegui compile error under Linux  (Read 4079 times)

Menion

  • Jr. Member
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 95
  • Winter is coming...
Amulegui compile error under Linux
« on: October 23, 2007, 08:39:59 PM »

Hi, CVS 23-10-2007, amulegui failed to compile (Linux Kubuntu 7.10 x86, wxWidgets 2.8.6 self-COMPILED, GTK 2.0.x and kernel 2.6.22)
I used: ./configure --enable-amule-daemon --enable-amule-gui --disable-monolithic
g++ ver 4.2

Quote
-2.8 -lwx_gtk2u_core-2.8 -lwx_baseu_net-2.8 -lwx_baseu-2.8   -lz
./libmuleappgui.a(libmuleappgui_a-CommentDialogLst.o): In function `CCommentDialogLst::UpdateList()':
CommentDialogLst.cpp:(.text+0x521): undefined reference to `CPartFile::GetRatingAndComments(std::list<SFileRating*, std::allocator<SFileRating*> >&)'
collect2: ld returned 1 exit status
make[3]: *** [amulegui] Error 1
make[3]: Leaving directory `/usr/src/amule-cvs/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/src/amule-cvs/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/amule-cvs'
make: *** [all] Error 2

Under the SAME enviroment, amule (from the same CVS snapshot) compile and works flawlessy
Bye!!!
Logged

Trevor Reznik

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 5
Re: Amulegui compile error under Linux
« Reply #1 on: November 18, 2007, 03:12:46 PM »

Hi all, first time on this board

I also have a problem with amule compilation with amulegui enabled on Linux (Debian Etch)

I used wxWidgets 2.8.6, follow configure options and output
Code: [Select]
./configure --prefix=/usr --with-gtk --enable-unicode --enable-optimise --disable-gui

Configured wxWidgets 2.8.6 for `i686-pc-linux-gnu'

  Which GUI toolkit should wxWidgets use?                 base only
  Should wxWidgets be compiled into single library?       no
  Should wxWidgets be compiled in debug mode?             no
  Should wxWidgets be linked as a shared library?         yes
  Should wxWidgets be compiled in Unicode mode?           yes
  What level of wxWidgets compatibility should be enabled?
                                       wxWidgets 2.4      no
                                       wxWidgets 2.6      yes
  Which libraries should wxWidgets use?
                                       jpeg               none
                                       png                none
                                       regex              builtin
                                       tiff               none
                                       zlib               sys
                                       odbc               no
                                       expat              sys
                                       libmspack          no
                                       sdl                no

ls -l /usr/bin/wx*
Code: [Select]
lrwxrwxrwx 1 root root 43 2007-11-17 11:28 /usr/bin/wx-config -> /usr/lib/wx/config/base-unicode-release-2.8
aMule-CVS-20071117 and aMule-CVS-20071118 snapshots work fine using amuleweb and amulecmd, but if  I configure with --enable-amule-gui all explode during make

amule configure
Code: [Select]
./configure --disable-debug --enable-optimize --enable-amuleweb --enable-amulecmd --enable-webserver --disable-monolithic --enable-amule-daemon --with-toolkit=base --enable-amule-gui

  Configure script has finished system check.

  Configured aMule CVS for 'i686-pc-linux-gnu'.

  aMule enabled options:

  **** aMule Core ****
  Prefix where aMule should be installed?                    /usr/local
  Should aMule be compiled with i18n support?                yes
  Should aMule be compiled in debug mode?                    no
  Should aMule be compiled with profiling?                   no
  Should aMule be compiled with optimizations?               yes
  Should aMule be compiled with UPnP support?                yes
  Should aMule be compiled with IP2country support?          yes
  Should aMule monolithic application be built?              no
  Should aMule daemon version be built?                      yes
  Should aMule remote gui be built? (EXPERIMENTAL)           yes
  Crypto++ library/headers style?                            embedded

  **** aMule TextClient ****
  Should aMule Command Line Client be built?                 yes

  **** aMule WebServer ****
  Should aMule WebServer be built?                           yes

  **** aMule ED2K Links Handler ****
  Should aMule ED2K Links Handler be built?                  yes

  **** aMuleLinkCreator ****
  Should aMuleLinkCreator GUI version (alc) be built?        no
  Should aMuleLinkCreator for console (alcc) be built?       no

  **** aMule Statistics ****
  Should C aMule Statistics (CAS) be built?                  no
  Should aMule GUI Statistics (wxCas) be built?              no

  **** General Libraries and Tools ****
  Should ccache support be enabled?                          no
  Libraries aMule will use to build:
                                       wxWidgets             2.8.6 (,shared)
                                       crypto++              embedded
                                       libpng                1.2.16
                                       libgd                 2.0.34
                                       zlib                  1.2.3

amule make error
Code: [Select]
if g++ -DHAVE_CONFIG_H -I. -I. -I..    -I/usr/lib/wx/include/base-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D_LARGEFILE_SOURCE=1 -DwxUSE_GUI=0 -pthread -I./libs -DENABLE_UPNP=1 -DUSE_EMBEDDED_CRYPTO -W -Wall -Wshadow -Wundef -O2  -DUSE_WX_EXTENSIONS -MT libmuleappgui_a-BarShader.o -MD -MP -MF ".deps/libmuleappgui_a-BarShader.Tpo" -c -o libmuleappgui_a-BarShader.o `test -f 'BarShader.cpp' || echo './'`BarShader.cpp; \
        then mv -f ".deps/libmuleappgui_a-BarShader.Tpo" ".deps/libmuleappgui_a-BarShader.Po"; else rm -f ".deps/libmuleappgui_a-BarShader.Tpo"; exit 1; fi
BarShader.cpp:26:19: error: wx/dc.h: No such file or directory
BarShader.cpp: In member function âvoid CBarShader::BuildModifiers()â:
BarShader.cpp:118: error: âsinâ was not declared in this scope
BarShader.cpp: In member function âvoid CBarShader::Draw(wxDC*, int, int, bool)â:
BarShader.cpp:161: error: aggregate âwxRect rectSpanâ has incomplete type and cannot be defined
BarShader.cpp:167: error: invalid use of undefined type âstruct wxDCâ
BarShader.h:34: error: forward declaration of âstruct wxDCâ
BarShader.cpp:167: error: âwxTRANSPARENT_PENâ was not declared in this scope
BarShader.cpp: In member function âvoid CBarShader::FillRect(wxDC*, const wxRect&, uint32, bool)â:
BarShader.cpp:255: error: âwxBrushâ was not declared in this scope
BarShader.cpp:255: error: expected `;' before âbrushâ
BarShader.cpp:256: error: invalid use of undefined type âstruct wxDCâ
BarShader.h:34: error: forward declaration of âstruct wxDCâ
BarShader.cpp:256: error: âbrushâ was not declared in this scope
BarShader.cpp:257: error: invalid use of undefined type âstruct wxDCâ
BarShader.h:34: error: forward declaration of âstruct wxDCâ
BarShader.cpp:259: error: invalid use of undefined type âconst struct wxRectâ
BarShader.h:33: error: forward declaration of âconst struct wxRectâ
BarShader.cpp:260: error: invalid use of undefined type âconst struct wxRectâ
BarShader.h:33: error: forward declaration of âconst struct wxRectâ
BarShader.cpp:260: error: invalid use of undefined type âconst struct wxRectâ
BarShader.h:33: error: forward declaration of âconst struct wxRectâ
BarShader.cpp:261: error: invalid use of undefined type âconst struct wxRectâ
BarShader.h:33: error: forward declaration of âconst struct wxRectâ
BarShader.cpp:262: error: invalid use of undefined type âconst struct wxRectâ
BarShader.h:33: error: forward declaration of âconst struct wxRectâ
BarShader.cpp:270: error: âwxPenâ was not declared in this scope
BarShader.cpp:270: error: expected `;' before âpenâ
BarShader.cpp:271: error: invalid use of undefined type âstruct wxDCâ
BarShader.h:34: error: forward declaration of âstruct wxDCâ
BarShader.cpp:271: error: âpenâ was not declared in this scope
BarShader.cpp:274: error: invalid use of undefined type âstruct wxDCâ
BarShader.h:34: error: forward declaration of âstruct wxDCâ
BarShader.cpp:277: error: invalid use of undefined type âstruct wxDCâ
BarShader.h:34: error: forward declaration of âstruct wxDCâ
BarShader.cpp:266: warning: unused variable âcRedâ
BarShader.cpp:267: warning: unused variable âcGreenâ
BarShader.cpp:268: warning: unused variable âcBlueâ
BarShader.cpp:281: error: invalid use of undefined type âstruct wxDCâ
BarShader.h:34: error: forward declaration of âstruct wxDCâ
BarShader.cpp:281: error: âwxNullBrushâ was not declared in this scope
make[3]: *** [libmuleappgui_a-BarShader.o] Error 1
make[3]: Leaving directory `/usr/src/amule-cvs/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/src/amule-cvs/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/amule-cvs'
make: *** [all] Error 2


Any idea?

Thanks
Logged

phoenix

  • Evil respawning bird from aMule Dev Team
  • Developer
  • Hero Member
  • *****
  • Karma: 44
  • Offline Offline
  • Posts: 2503
  • The last shadow you'll ever see
Re: Amulegui compile error under Linux
« Reply #2 on: November 18, 2007, 03:25:15 PM »

Code: [Select]
BarShader.cpp:26:19: error: wx/dc.h: No such file or directoryYour system headers are bugged. Maybe you dont have wxWidgets-devel or maybe your distro is flawed. Either install the devel package or compile wx yourself from the original tarball.

Cheers!
Logged

Trevor Reznik

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 5
Re: Amulegui compile error under Linux
« Reply #3 on: November 18, 2007, 06:21:42 PM »

Code: [Select]
BarShader.cpp:26:19: error: wx/dc.h: No such file or directoryYour system headers are bugged. Maybe you dont have wxWidgets-devel or maybe your distro is flawed. Either install the devel package or compile wx yourself from the original tarball.

Cheers!
Thanks for reply :)

The logs I've posted before were taken from wxWidgets source install.
I downloaded wxall, untarred and configured with
Code: [Select]
./configure --prefix=/usr --with-gtk --enable-unicode --enable-optimise
After that I lauched "make && make install"

Perhaps I forgot something during configure?

Bye!
Logged

phoenix

  • Evil respawning bird from aMule Dev Team
  • Developer
  • Hero Member
  • *****
  • Karma: 44
  • Offline Offline
  • Posts: 2503
  • The last shadow you'll ever see
Re: Amulegui compile error under Linux
« Reply #4 on: November 18, 2007, 08:08:42 PM »

Hi Trevor Reznik,

Sorry, I did not notice that. I believe there is something missing in configure indeed, look:
Quote
./configure --prefix=/usr --with-gtk --enable-unicode --enable-optimise --disable-gui

Configured wxWidgets 2.8.6 for `i686-pc-linux-gnu'

  Which GUI toolkit should wxWidgets use?                 base only

base only might be the problem. Try the following line for a debug build:
Code: [Select]
$ ./configure --enable-debug --disable-optimise --enable-debug_flag --enable-debug_info --enable-debug_gdb --with-opengl --enable-gtk2 --enable-unicode --enable-largefile --prefix=/home/myuser/usr/local/wxWidgets-2.8.6 && make && make install
My output for this line was
Code: [Select]
Configured wxWidgets 2.8.6 for `i686-pc-linux-gnu'

  Which GUI toolkit should wxWidgets use?                 GTK+ 2 with support for gnomeprint
  Should wxWidgets be compiled into single library?       no
  Should wxWidgets be compiled in debug mode?             yes
  Should wxWidgets be linked as a shared library?         yes
  Should wxWidgets be compiled in Unicode mode?           yes
  What level of wxWidgets compatibility should be enabled?
                                       wxWidgets 2.4      no
                                       wxWidgets 2.6      yes
  Which libraries should wxWidgets use?
                                       jpeg               sys
                                       png                sys
                                       regex              builtin
                                       tiff               sys
                                       zlib               sys
                                       odbc               no
                                       expat              sys
                                       libmspack          no
                                       sdl                no

Once everything is ok, you can ommit the flags " --enable-debug --disable-optimise --enable-debug_flag --enable-debug_info --enable-debug_gdb". Also notice that I have altered the prefix to my home directory, so that I can delete things more easily later. If you configured with that line and wxWidgets is not ld.so.conf, you must start aMule like this:
Code: [Select]
$LD_LIBRARY_PATH=/home/myuser/usr/local/wxWidgets-2.8.6/lib/:/home/myuser/usr/local/libupnp/lib/ LANG=en_US.UTF-8 trunk5/src/amule
Notice that both wxWidgets and the UPnP libraries were compiled by me and are not on the system. Also my system is not en_US.UTF-8, but as aMule supports unicode, you can play with that string to make it appear in any supported language.

Cheers!
Logged

Trevor Reznik

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 5
Re: Amulegui compile error under Linux
« Reply #5 on: November 18, 2007, 11:36:57 PM »

Hi Trevor Reznik,

Sorry, I did not notice that. I believe there is something missing in configure indeed, look:
Quote
./configure --prefix=/usr --with-gtk --enable-unicode --enable-optimise --disable-gui

Configured wxWidgets 2.8.6 for `i686-pc-linux-gnu'

  Which GUI toolkit should wxWidgets use?                 base only

base only might be the problem. Try the following line for a debug build:
Code: [Select]
$ ./configure --enable-debug --disable-optimise --enable-debug_flag --enable-debug_info --enable-debug_gdb --with-opengl --enable-gtk2 --enable-unicode --enable-largefile --prefix=/home/myuser/usr/local/wxWidgets-2.8.6 && make && make install
My output for this line was
Code: [Select]
Configured wxWidgets 2.8.6 for `i686-pc-linux-gnu'

  Which GUI toolkit should wxWidgets use?                 GTK+ 2 with support for gnomeprint
  Should wxWidgets be compiled into single library?       no
  Should wxWidgets be compiled in debug mode?             yes
  Should wxWidgets be linked as a shared library?         yes
  Should wxWidgets be compiled in Unicode mode?           yes
  What level of wxWidgets compatibility should be enabled?
                                       wxWidgets 2.4      no
                                       wxWidgets 2.6      yes
  Which libraries should wxWidgets use?
                                       jpeg               sys
                                       png                sys
                                       regex              builtin
                                       tiff               sys
                                       zlib               sys
                                       odbc               no
                                       expat              sys
                                       libmspack          no
                                       sdl                no

Once everything is ok, you can ommit the flags " --enable-debug --disable-optimise --enable-debug_flag --enable-debug_info --enable-debug_gdb". Also notice that I have altered the prefix to my home directory, so that I can delete things more easily later. If you configured with that line and wxWidgets is not ld.so.conf, you must start aMule like this:
Code: [Select]
$LD_LIBRARY_PATH=/home/myuser/usr/local/wxWidgets-2.8.6/lib/:/home/myuser/usr/local/libupnp/lib/ LANG=en_US.UTF-8 trunk5/src/amule
Notice that both wxWidgets and the UPnP libraries were compiled by me and are not on the system. Also my system is not en_US.UTF-8, but as aMule supports unicode, you can play with that string to make it appear in any supported language.

Cheers!
I triend to configure wxWidgets with parameters you suggested but it always returns base only GUI toolkit  :'(

Using Debian I tried to install almost every gtk package with apt-get, but nothing changes, have you got any suggestion?

Here is my input
Code: [Select]
./configure --enable-debug --disable-optimise --enable-debug_flag --enable-debug_info --enable-debug_gdb --with-opengl --enable-gtk2 --enable-unicode --enable-largefile --prefix=/home/amule
and the resulting output
Code: [Select]
Configured wxWidgets 2.8.6 for `i686-pc-linux-gnu'

  Which GUI toolkit should wxWidgets use?                 base only
  Should wxWidgets be compiled into single library?       no
  Should wxWidgets be compiled in debug mode?             yes
  Should wxWidgets be linked as a shared library?         yes
  Should wxWidgets be compiled in Unicode mode?           yes
  What level of wxWidgets compatibility should be enabled?
                                       wxWidgets 2.4      no
                                       wxWidgets 2.6      yes
  Which libraries should wxWidgets use?
                                       jpeg               none
                                       png                none
                                       regex              builtin
                                       tiff               none
                                       zlib               sys
                                       odbc               no
                                       expat              sys
                                       libmspack          no
                                       sdl                no

Thanks again for your patience :)
Logged

phoenix

  • Evil respawning bird from aMule Dev Team
  • Developer
  • Hero Member
  • *****
  • Karma: 44
  • Offline Offline
  • Posts: 2503
  • The last shadow you'll ever see
Re: Amulegui compile error under Linux
« Reply #6 on: November 19, 2007, 12:05:31 AM »

Trevor Reznik,

Look carefully at the output of the configure script. Search for "checking for toolkit". There must be some message there. Also, take a good look at a file named config.log. It is tedious, but I see no other solution.

Quote
checking for --enable-ico_cur... yes
checking for --enable-official_build... no
saving argument cache configarg.cache
checking for toolkit... gtk
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
Logged