aMule Forum

English => Compilation problems => Topic started by: markellos on October 04, 2010, 06:43:25 PM

Title: Compilation problem
Post by: markellos on October 04, 2010, 06:43:25 PM
Hi guys, I was trying to compile by myself aMule 2.2.6 on a Mac with 10.6.4. First of all I've to say that I am absolutely new to any kind of programming, I have only some few little basic skills with the shell. However I was able to complete almost all the operation when I faced these errors:

Code: [Select]
ECMuleSocket.cpp: In member function ‘virtual int CECMuleSocket::InternalGetLastError()’:
ECMuleSocket.cpp:136: error: ‘wxSOCKET_DUMMY’ was not declared in this scope
ECMuleSocket.cpp:115: warning: enumeration value ‘wxSOCKET_OPTERR’ not handled in switch
make[7]: *** [ECMuleSocket.o] Error 1
make[6]: *** [all] Error 2
make[5]: *** [all-recursive] Error 1
make[4]: *** [all] Error 2
make[3]: *** [all-recursive] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

I compiled with success both wxWidgets (ver. 2.9.1) and aMule (ver. 2.2.6) but make gives me these error. Any help?
Title: Re: Compilation problem
Post by: Stu Redman on October 04, 2010, 09:05:24 PM
2.2.6 does not compile with wx 2.9 . You have to take aMule SVN version for wx 2.9. Or 2.2.6 with wx 2.8 .
Title: Re: Compilation problem
Post by: myth on October 04, 2010, 10:23:43 PM
Take SVN ;) Much innovation in there!

Then...a better thread title wouldn't be bad!
Title: Re: Compilation problem
Post by: markellos on October 05, 2010, 01:32:32 AM
2.2.6 does not compile with wx 2.9 . You have to take aMule SVN version for wx 2.9. Or 2.2.6 with wx 2.8 .

Thanks for your rapid answers! I followed your instructions and I downloaded SVN 10306 published 5 days ago. But...a similar error occurred!
Here is the log:

Code: [Select]
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[5]: *** [wxcas] Error 1
make[4]: *** [all-recursive] Error 1
make[3]: *** [all-recursive] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
Title: Re: Compilation problem
Post by: Stu Redman on October 05, 2010, 08:35:32 PM
You left out the interesting part of the log.
Title: Re: Compilation problem
Post by: markellos on October 05, 2010, 09:03:31 PM
You left out the interesting part of the log.

Do you really want ALL the make log? I read somewhere not to post the make log (in effect it say that the message is longer than 20.000 characters). Do you need a specific part?
Title: Re: Compilation problem
Post by: GonoszTopi on October 05, 2010, 10:06:55 PM
Not all. The last screenful of the log (say, the last ~20 lines) should be more than enough. In your case, the 1-2 lines before what you posted hold critical information to solve your problem.
Title: Re: Compilation problem
Post by: markellos on October 05, 2010, 11:18:00 PM
Not all. The last screenful of the log (say, the last ~20 lines) should be more than enough. In your case, the 1-2 lines before what you posted hold critical information to solve your problem.

ok. Here it is:

Code: [Select]
wxSize const&, long, wxString const&)in wxcasprefs.o
  "wxWindowBase::GetHelpTextAtPoint(wxPoint const&, wxHelpEvent::Origin) const", referenced from:
      vtable for wxMDIParentFrameBasein onlinesig.o
      vtable for wxMDIClientWindowBasein onlinesig.o
      vtable for wxMDIParentFrameBasein linuxmon.o
      vtable for wxMDIClientWindowBasein linuxmon.o
      vtable for wxMDIParentFrameBasein wxcas.o
      vtable for wxMDIClientWindowBasein wxcas.o
      vtable for wxMDIParentFrameBasein wxcasprint.o
      vtable for wxMDIClientWindowBasein wxcasprint.o
      vtable for WxCasFramein wxcasframe.o
      vtable for wxMDIParentFrameBasein wxcasframe.o
      vtable for wxMDIClientWindowBasein wxcasframe.o
      vtable for wxStaticLineBasein wxcasframe.o
      vtable for WxCasPrefsin wxcasprefs.o
      vtable for wxMDIParentFrameBasein wxcasprefs.o
      vtable for wxMDIClientWindowBasein wxcasprefs.o
      vtable for wxCheckBoxBasein wxcasprefs.o
      vtable for wxStaticLineBasein wxcasprefs.o
      vtable for wxMDIParentFrameBasein wxcascte.o
      vtable for wxMDIClientWindowBasein wxcascte.o
      vtable for wxMDIParentFrameBasein wxcaspix.o
      vtable for wxMDIClientWindowBasein wxcaspix.o
  "vtable for wxTopLevelWindow", referenced from:
      wxTopLevelWindow::wxTopLevelWindow()in wxcasprefs.o
      wxTopLevelWindow::~wxTopLevelWindow()in wxcasprefs.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[5]: *** [wxcas] Error 1
make[4]: *** [all-recursive] Error 1
make[3]: *** [all-recursive] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Is it enough?
Title: Re: Compilation problem
Post by: Stu Redman on October 06, 2010, 10:19:14 PM
Not really.

How did you configure wxWidgets? How did you configure aMule?
I think you may be missing the wxWidgets libs. But I really don't know much about Mac.
Title: Re: Compilation problem
Post by: markellos on October 07, 2010, 01:00:00 AM
Not really.

How did you configure wxWidgets? How did you configure aMule?
I think you may be missing the wxWidgets libs. But I really don't know much about Mac.

Ok then, let's start from the beginning.  Downloaded vxWidgets version 2.9.1 and configured it with
Code: [Select]
./configure --disable-shared --enable-unicode --disable-debug --disable-debug_gdb --with-libiconv-prefix=/opt/local/var/macports/software/libiconv/1.13.1_0/opt/local && make -j8 I post you some excepts of the log, when it print a WARNING, none explicit error detected.
Code: [Select]
checking for sw_vers... sw_vers
configure:18644: WARNING: gcc >= 4.2 cannot compile 10.4 compatible code. Using gcc 4.0 instead.

configure: WARNING: Defaulting to the builtin regex library for Unicode build.

checking for png.h > 0.90... no
checking for png.h... (cached) no
configure: WARNING: system png library not found or too old, will use built-in instead
checking for jpeglib.h... no
configure: WARNING: system jpeg library not found, will use built-in instead
checking for tiffio.h... no
configure: WARNING: system tiff library not found, will use built-in instead

checking for pthread_mutex_timedlock... no
configure: WARNING: wxMutex::LockTimeout() will not work

checking for sys/epoll.h... no
configure: WARNING: sys/epoll.h not available, wxEpollDispatcher disabled

checking for timezone variable in <time.h>... configure: WARNING: no timezone variable


config.status: WARNING:  Makefile.in seems to ignore the --datarootdir setting
config.status: creating contrib/Makefile
config.status: WARNING:  contrib/Makefile.in seems to ignore the --datarootdir setting
config.status: creating contrib/acorn/Makefile
config.status: WARNING:  contrib/acorn/Makefile.in seems to ignore the --datarootdir setting
config.status: creating contrib/addtiffo/Makefile
config.status: WARNING:  contrib/addtiffo/Makefile.in seems to ignore the --datarootdir setting
config.status: creating contrib/dbs/Makefile
config.status: WARNING:  contrib/dbs/Makefile.in seems to ignore the --datarootdir setting
config.status: creating contrib/dbs/xtiff/Makefile
config.status: WARNING:  contrib/dbs/xtiff/Makefile.in seems to ignore the --datarootdir setting
config.status: creating contrib/iptcutil/Makefile
config.status: WARNING:  contrib/iptcutil/Makefile.in seems to ignore the --datarootdir setting
config.status: creating contrib/mac-cw/Makefile
config.status: WARNING:  contrib/mac-cw/Makefile.in seems to ignore the --datarootdir setting
config.status: creating contrib/mac-mpw/Makefile
config.status: WARNING:  contrib/mac-mpw/Makefile.in seems to ignore the --datarootdir setting
config.status: creating contrib/mfs/Makefile
config.status: WARNING:  contrib/mfs/Makefile.in seems to ignore the --datarootdir setting
config.status: creating contrib/ojpeg/Makefile
config.status: WARNING:  contrib/ojpeg/Makefile.in seems to ignore the --datarootdir setting
config.status: creating contrib/pds/Makefile
config.status: WARNING:  contrib/pds/Makefile.in seems to ignore the --datarootdir setting
config.status: creating contrib/ras/Makefile
config.status: WARNING:  contrib/ras/Makefile.in seems to ignore the --datarootdir setting
config.status: creating contrib/stream/Makefile
config.status: WARNING:  contrib/stream/Makefile.in seems to ignore the --datarootdir setting
config.status: creating contrib/tags/Makefile
config.status: WARNING:  contrib/tags/Makefile.in seems to ignore the --datarootdir setting
config.status: creating contrib/win_dib/Makefile
config.status: WARNING:  contrib/win_dib/Makefile.in seems to ignore the --datarootdir setting
config.status: creating html/Makefile
config.status: WARNING:  html/Makefile.in seems to ignore the --datarootdir setting
config.status: creating html/images/Makefile
config.status: WARNING:  html/images/Makefile.in seems to ignore the --datarootdir setting
config.status: creating html/man/Makefile
config.status: WARNING:  html/man/Makefile.in seems to ignore the --datarootdir setting
config.status: creating libtiff/Makefile
config.status: WARNING:  libtiff/Makefile.in seems to ignore the --datarootdir setting
config.status: creating man/Makefile
config.status: WARNING:  man/Makefile.in seems to ignore the --datarootdir setting
config.status: creating port/Makefile
config.status: WARNING:  port/Makefile.in seems to ignore the --datarootdir setting
config.status: creating test/Makefile
config.status: WARNING:  test/Makefile.in seems to ignore the --datarootdir setting
config.status: creating tools/Makefile
config.status: WARNING:  tools/Makefile.in seems to ignore the --datarootdir setting

Then aMule (SVN 10306). Here I have to edit the configure, in order to avoid it to check which version of the toolkit I am using. Here is the code modified:
Code: [Select]
if test "$TOOLKIT" = "auto" ; then

            #                        { echo "$as_me:$LINENO: checking which wxWidgets toolkit was selected" >&5
#echo $ECHO_N "checking which wxWidgets toolkit was selected... $ECHO_C" >&6; }
#
#            WX_GTKPORT1=$(expr "$WX_SELECTEDCONFIG" : ".*gtk1.*")
#            WX_GTKPORT2=$(expr "$WX_SELECTEDCONFIG" : ".*gtk2.*")
#            WX_MSWPORT=$(expr "$WX_SELECTEDCONFIG" : ".*msw.*")
#            WX_MOTIFPORT=$(expr "$WX_SELECTEDCONFIG" : ".*motif.*")
#            WX_MACPORT=$(expr "$WX_SELECTEDCONFIG" : ".*mac.*")
#            WX_X11PORT=$(expr "$WX_SELECTEDCONFIG" : ".*x11.*")
#            WX_MGLPORT=$(expr "$WX_SELECTEDCONFIG" : ".*mgl.*")
#            WX_DFBPORT=$(expr "$WX_SELECTEDCONFIG" : ".*dfb.*")
#
            WX_PORT="gtk2"
#            if test "$WX_GTKPORT1" != "0"; then WX_PORT="gtk1"; fi
#            if test "$WX_GTKPORT2" != "0"; then WX_PORT="gtk2"; fi
#            if test "$WX_MSWPORT" != "0"; then WX_PORT="msw"; fi
#            if test "$WX_MOTIFPORT" != "0"; then WX_PORT="motif"; fi
#            if test "$WX_MACPORT" != "0"; then WX_PORT="mac"; fi
#            if test "$WX_X11PORT" != "0"; then WX_PORT="x11"; fi
#            if test "$WX_MGLPORT" != "0"; then WX_PORT="mgl"; fi
#            if test "$WX_DFBPORT" != "0"; then WX_PORT="dfb"; fi
#
#
#            if test "$WX_PORT" = "unknown" ; then
#                { { echo "$as_me:$LINENO: error:
#        Cannot detect the currently installed wxWidgets port !
#        Please check your 'wx-config --cxxflags'...
#                            " >&5
#echo "$as_me: error:
#        Cannot detect the currently installed wxWidgets port !
#        Please check your 'wx-config --cxxflags'...
#                            " >&2;}
#   { (exit 1); exit 1; }; }
#            fi

            { echo "$as_me:$LINENO: result: $WX_PORT" >&5
echo "${ECHO_T}$WX_PORT" >&6; }
        else

                        if test -z "$TOOLKIT" ; then
                WX_PORT=$TOOLKIT
            else
                                WX_PORT=$PORT
            fi
        fi
Then I can finally configure with:
Code: [Select]
./configure --with-wxdir=/Users/admin/Desktop/aMuleSVN/wxWidgets-2.9.1  --enable-optimize --with-crypto-prefix=/opt/local  --with-gdlib-config=/opt/local/bin/gdlib-config  --with-libiconv-prefix=/opt/local/var/macports/software/libiconv/1.13.1_0/opt/local/bin --enable-cas --enable-webserver  --enable-amulecmd --enable-amule-gui --enable-wxcas --enable-alc --enable-alcc --enable-amule-daemon --enable-geoip  --with-geoip-lib=/opt/local/var/macports/software/libgeoip/1.4.6_0/opt/local --with-geoip-headers=/opt/local/var/macports/software/libgeoip/1.4.6_0/opt/local/include --enable-geoip-static --enable-debugThe parts of the log that i consider interesting:
Code: [Select]
checking gd.h usability... yes
checking gd.h presence... no
configure: WARNING: gd.h: accepted by the compiler, rejected by the preprocessor!
configure: WARNING: gd.h: proceeding with the compiler's result
checking for gd.h... yes

checking for GeoIP_open in -lGeoIP... no
configure: WARNING:
        GeoIP support has been disabled because the GeoIP libraries were not found

checking for wxWidgets version >= 2.8.8 (--unicode=yes)... yes (version 2.9.1)
checking if wxWidgets was built in DEBUG mode... no
checking if wxWidgets was built in STATIC mode... yes
gtk2

checking if the linker (ld) is GNU ld... no

checking for bfd... no
configure: WARNING:
        bfd.h not found or unusable, please install binutils development
        package if you are a developer or want to help testing aMule

  Configure script has finished system check.

  Configured aMule SVN (rev. 10306) for 'i686-apple-darwin10.4.0'.

  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?                    yes
  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?          disabled
  Should aMule monolithic application be built?              yes
  Should aMule daemon version be built?                      yes
  Should aMule remote gui be built? (EXPERIMENTAL)           yes
  Crypto++ library/headers style?                            installed

  **** 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?        yes
  Should aMuleLinkCreator for console (alcc) be built?       yes

  **** aMule Statistics ****
  Should C aMule Statistics (CAS) be built?                  yes
  Should aMule GUI Statistics (wxCas) be built?              yes
  Should xas XChat2 plugin be installed?                     no
  Should plasmaMule plasma-applet be build?                  no

  **** General Libraries and Tools ****
  Should ccache support be enabled?                          no
  Libraries aMule will use to build:
                                       wxWidgets             2.9.1 (gtk2,static)
                                       crypto++              5.6.1 (installed, in /opt/local)
                                       libupnp               1.6.6
                                       libintl               included
                                       libpng                1.2.44
                                       libgd                 2.0.35
                                       zlib                  1.2.3


 *** Warnings during configuration ***

* GeoIP support has been disabled because the GeoIP libraries were not found

* bfd.h not found or unusable, please install binutils development package ifyou are a developer or want to help testing aMule

Is something useful?
Title: Re: Compilation problem
Post by: ^marcell^ on October 07, 2010, 05:43:07 PM
Can you post the output of "ls -l /Users/admin/Desktop/aMuleSVN/wxWidgets-2.9.1" ?
Title: Re: Compilation problem
Post by: markellos on October 07, 2010, 06:34:22 PM
The log is 50.00+ characters long. I cannot post it. How can I do?
Title: Re: Compilation problem
Post by: Kry on October 07, 2010, 07:24:27 PM
Why is port gtk2?
Title: Re: Compilation problem
Post by: markellos on October 07, 2010, 07:58:40 PM
Why is port gtk2?

Ehm...what should it be?
Title: Re: Compilation problem
Post by: Kry on October 07, 2010, 10:39:07 PM
In your case? whatever port wxwidgets reports. Chances are osx_cocoa or something similar if it's 2.9. Check it on the summary after running configure on wx.
Title: Re: Compilation problem
Post by: Stu Redman on October 07, 2010, 11:06:25 PM
Also I found wx 2.9 doesn't like to be built static. At least not in Linux. Windows works fine, but in Linux I got lots of link errors when I had built it static. No idea about Mac.
Any reason for you to use 2.9 at all? You know, that's quite unstable and not the ideal subject to get started with building.  ;)
Title: Re: Compilation problem
Post by: markellos on October 08, 2010, 01:20:43 AM
In your case? whatever port wxwidgets reports. Chances are osx_cocoa or something similar if it's 2.9. Check it on the summary after running configure on wx.

Yes, I know. But if don't specify which toolkit to use the amule configure can't recognize and reports an error. But even if I set --toolkit=osx_cocoa, configure skip this parameter and fail in the same error:
Code: [Select]
checking which wxWidgets toolkit was selected... configure: error:
        Cannot detect the currently installed wxWidgets port !
        Please check your 'wx-config --cxxflags'...
Title: Re: Compilation problem
Post by: markellos on October 08, 2010, 01:33:05 AM
Also I found wx 2.9 doesn't like to be built static. At least not in Linux. Windows works fine, but in Linux I got lots of link errors when I had built it static. No idea about Mac.
Any reason for you to use 2.9 at all? You know, that's quite unstable and not the ideal subject to get started with building.  ;)

Because I read that's the only way to get aMule in 64bits. And also because some days ago I tried with 2.8.11 but I obtained errors too, so I thought: "There are errors in both cases, let's try to compile the newer version!" I noticed something interesting:
Code: [Select]
configure:18644: WARNING: gcc >= 4.2 cannot compile 10.4 compatible code. Using gcc 4.0 instead.

...
Configured wxWidgets 2.9.1 for `i686-apple-darwin10.4.0'

  Which GUI toolkit should wxWidgets use?                 osx_carbon

This automatically means no 64bits. Who tell it that I want to build a version compatible with previous OS? This was my configure:
Code: [Select]
./configure --disable-shared --enable-unicode --disable-debug --disable-debug_gdb --with-libiconv-prefix=/opt/local/var/macports/software/libiconv/1.13.1_0/opt/local && make
Any idea? I'm getting crazy today....
Title: Re: Compilation problem
Post by: Kry on October 08, 2010, 09:27:40 PM
There are wxWidgets options for osx_cocoa. I actually believe the configure flag is --with-osx_cocoa , but check ./configure --help
Title: Re: Compilation problem
Post by: markellos on October 08, 2010, 10:42:13 PM
There are wxWidgets options for osx_cocoa. I actually believe the configure flag is --with-osx_cocoa , but check ./configure --help

You were right! I though, don't know why, that the flag was --toolkit-os_cocoa. However the problems still remain:
Code: [Select]

Making all in wxCas
Making all in src
if g++ -DHAVE_CONFIG_H -I. -I. -I../../../..  -no-cpp-precomp -D_INTL_REDIRECT_MACROS -DNOPCH -D__DEBUG__ -D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC -DUSE_WX_EXTENSIONS -I/Users/admin/Desktop/aMuleSVN/Build2/wxWidgets-2.9.1/lib/wx/include/osx_cocoa-unicode-static-2.9 -I/Users/admin/Desktop/aMuleSVN/Build2/wxWidgets-2.9.1/include -D_FILE_OFFSET_BITS=64 -D__WXMAC__ -D__WXOSX__ -D__WXOSX_COCOA__  -g -W -Wall -Wshadow -Wundef -ggdb -fno-inline -fmessage-length=0 -O2  -I/Users/admin/Desktop/aMuleSVN/Build2/wxWidgets-2.9.1/lib/wx/include/osx_cocoa-unicode-static-2.9 -I/Users/admin/Desktop/aMuleSVN/Build2/wxWidgets-2.9.1/include -D_FILE_OFFSET_BITS=64 -D__WXMAC__ -D__WXOSX__ -D__WXOSX_COCOA__  -MT onlinesig.o -MD -MP -MF ".deps/onlinesig.Tpo" -c -o onlinesig.o onlinesig.cpp; \
then mv -f ".deps/onlinesig.Tpo" ".deps/onlinesig.Po"; else rm -f ".deps/onlinesig.Tpo"; exit 1; fi
if g++ -DHAVE_CONFIG_H -I. -I. -I../../../..  -no-cpp-precomp -D_INTL_REDIRECT_MACROS -DNOPCH -D__DEBUG__ -D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC -DUSE_WX_EXTENSIONS -I/Users/admin/Desktop/aMuleSVN/Build2/wxWidgets-2.9.1/lib/wx/include/osx_cocoa-unicode-static-2.9 -I/Users/admin/Desktop/aMuleSVN/Build2/wxWidgets-2.9.1/include -D_FILE_OFFSET_BITS=64 -D__WXMAC__ -D__WXOSX__ -D__WXOSX_COCOA__  -g -W -Wall -Wshadow -Wundef -ggdb -fno-inline -fmessage-length=0 -O2  -I/Users/admin/Desktop/aMuleSVN/Build2/wxWidgets-2.9.1/lib/wx/include/osx_cocoa-unicode-static-2.9 -I/Users/admin/Desktop/aMuleSVN/Build2/wxWidgets-2.9.1/include -D_FILE_OFFSET_BITS=64 -D__WXMAC__ -D__WXOSX__ -D__WXOSX_COCOA__  -MT linuxmon.o -MD -MP -MF ".deps/linuxmon.Tpo" -c -o linuxmon.o linuxmon.cpp; \
then mv -f ".deps/linuxmon.Tpo" ".deps/linuxmon.Po"; else rm -f ".deps/linuxmon.Tpo"; exit 1; fi
if g++ -DHAVE_CONFIG_H -I. -I. -I../../../..  -no-cpp-precomp -D_INTL_REDIRECT_MACROS -DNOPCH -D__DEBUG__ -D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC -DUSE_WX_EXTENSIONS -I/Users/admin/Desktop/aMuleSVN/Build2/wxWidgets-2.9.1/lib/wx/include/osx_cocoa-unicode-static-2.9 -I/Users/admin/Desktop/aMuleSVN/Build2/wxWidgets-2.9.1/include -D_FILE_OFFSET_BITS=64 -D__WXMAC__ -D__WXOSX__ -D__WXOSX_COCOA__  -g -W -Wall -Wshadow -Wundef -ggdb -fno-inline -fmessage-length=0 -O2  -I/Users/admin/Desktop/aMuleSVN/Build2/wxWidgets-2.9.1/lib/wx/include/osx_cocoa-unicode-static-2.9 -I/Users/admin/Desktop/aMuleSVN/Build2/wxWidgets-2.9.1/include -D_FILE_OFFSET_BITS=64 -D__WXMAC__ -D__WXOSX__ -D__WXOSX_COCOA__  -MT wxcas.o -MD -MP -MF ".deps/wxcas.Tpo" -c -o wxcas.o wxcas.cpp; \
then mv -f ".deps/wxcas.Tpo" ".deps/wxcas.Po"; else rm -f ".deps/wxcas.Tpo"; exit 1; fi
if g++ -DHAVE_CONFIG_H -I. -I. -I../../../..  -no-cpp-precomp -D_INTL_REDIRECT_MACROS -DNOPCH -D__DEBUG__ -D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC -DUSE_WX_EXTENSIONS -I/Users/admin/Desktop/aMuleSVN/Build2/wxWidgets-2.9.1/lib/wx/include/osx_cocoa-unicode-static-2.9 -I/Users/admin/Desktop/aMuleSVN/Build2/wxWidgets-2.9.1/include -D_FILE_OFFSET_BITS=64 -D__WXMAC__ -D__WXOSX__ -D__WXOSX_COCOA__  -g -W -Wall -Wshadow -Wundef -ggdb -fno-inline -fmessage-length=0 -O2  -I/Users/admin/Desktop/aMuleSVN/Build2/wxWidgets-2.9.1/lib/wx/include/osx_cocoa-unicode-static-2.9 -I/Users/admin/Desktop/aMuleSVN/Build2/wxWidgets-2.9.1/include -D_FILE_OFFSET_BITS=64 -D__WXMAC__ -D__WXOSX__ -D__WXOSX_COCOA__  -MT wxcasprint.o -MD -MP -MF ".deps/wxcasprint.Tpo" -c -o wxcasprint.o wxcasprint.cpp; \
then mv -f ".deps/wxcasprint.Tpo" ".deps/wxcasprint.Po"; else rm -f ".deps/wxcasprint.Tpo"; exit 1; fi
if g++ -DHAVE_CONFIG_H -I. -I. -I../../../..  -no-cpp-precomp -D_INTL_REDIRECT_MACROS -DNOPCH -D__DEBUG__ -D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC -DUSE_WX_EXTENSIONS -I/Users/admin/Desktop/aMuleSVN/Build2/wxWidgets-2.9.1/lib/wx/include/osx_cocoa-unicode-static-2.9 -I/Users/admin/Desktop/aMuleSVN/Build2/wxWidgets-2.9.1/include -D_FILE_OFFSET_BITS=64 -D__WXMAC__ -D__WXOSX__ -D__WXOSX_COCOA__  -g -W -Wall -Wshadow -Wundef -ggdb -fno-inline -fmessage-length=0 -O2  -I/Users/admin/Desktop/aMuleSVN/Build2/wxWidgets-2.9.1/lib/wx/include/osx_cocoa-unicode-static-2.9 -I/Users/admin/Desktop/aMuleSVN/Build2/wxWidgets-2.9.1/include -D_FILE_OFFSET_BITS=64 -D__WXMAC__ -D__WXOSX__ -D__WXOSX_COCOA__  -MT wxcasframe.o -MD -MP -MF ".deps/wxcasframe.Tpo" -c -o wxcasframe.o wxcasframe.cpp; \
then mv -f ".deps/wxcasframe.Tpo" ".deps/wxcasframe.Po"; else rm -f ".deps/wxcasframe.Tpo"; exit 1; fi
if g++ -DHAVE_CONFIG_H -I. -I. -I../../../..  -no-cpp-precomp -D_INTL_REDIRECT_MACROS -DNOPCH -D__DEBUG__ -D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC -DUSE_WX_EXTENSIONS -I/Users/admin/Desktop/aMuleSVN/Build2/wxWidgets-2.9.1/lib/wx/include/osx_cocoa-unicode-static-2.9 -I/Users/admin/Desktop/aMuleSVN/Build2/wxWidgets-2.9.1/include -D_FILE_OFFSET_BITS=64 -D__WXMAC__ -D__WXOSX__ -D__WXOSX_COCOA__  -g -W -Wall -Wshadow -Wundef -ggdb -fno-inline -fmessage-length=0 -O2  -I/Users/admin/Desktop/aMuleSVN/Build2/wxWidgets-2.9.1/lib/wx/include/osx_cocoa-unicode-static-2.9 -I/Users/admin/Desktop/aMuleSVN/Build2/wxWidgets-2.9.1/include -D_FILE_OFFSET_BITS=64 -D__WXMAC__ -D__WXOSX__ -D__WXOSX_COCOA__  -MT wxcasprefs.o -MD -MP -MF ".deps/wxcasprefs.Tpo" -c -o wxcasprefs.o wxcasprefs.cpp; \
then mv -f ".deps/wxcasprefs.Tpo" ".deps/wxcasprefs.Po"; else rm -f ".deps/wxcasprefs.Tpo"; exit 1; fi
if g++ -DHAVE_CONFIG_H -I. -I. -I../../../..  -no-cpp-precomp -D_INTL_REDIRECT_MACROS -DNOPCH -D__DEBUG__ -D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC -DUSE_WX_EXTENSIONS -I/Users/admin/Desktop/aMuleSVN/Build2/wxWidgets-2.9.1/lib/wx/include/osx_cocoa-unicode-static-2.9 -I/Users/admin/Desktop/aMuleSVN/Build2/wxWidgets-2.9.1/include -D_FILE_OFFSET_BITS=64 -D__WXMAC__ -D__WXOSX__ -D__WXOSX_COCOA__  -g -W -Wall -Wshadow -Wundef -ggdb -fno-inline -fmessage-length=0 -O2  -I/Users/admin/Desktop/aMuleSVN/Build2/wxWidgets-2.9.1/lib/wx/include/osx_cocoa-unicode-static-2.9 -I/Users/admin/Desktop/aMuleSVN/Build2/wxWidgets-2.9.1/include -D_FILE_OFFSET_BITS=64 -D__WXMAC__ -D__WXOSX__ -D__WXOSX_COCOA__  -MT wxcascte.o -MD -MP -MF ".deps/wxcascte.Tpo" -c -o wxcascte.o wxcascte.cpp; \
then mv -f ".deps/wxcascte.Tpo" ".deps/wxcascte.Po"; else rm -f ".deps/wxcascte.Tpo"; exit 1; fi
if g++ -DHAVE_CONFIG_H -I. -I. -I../../../..  -no-cpp-precomp -D_INTL_REDIRECT_MACROS -DNOPCH -D__DEBUG__ -D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC -DUSE_WX_EXTENSIONS -I/Users/admin/Desktop/aMuleSVN/Build2/wxWidgets-2.9.1/lib/wx/include/osx_cocoa-unicode-static-2.9 -I/Users/admin/Desktop/aMuleSVN/Build2/wxWidgets-2.9.1/include -D_FILE_OFFSET_BITS=64 -D__WXMAC__ -D__WXOSX__ -D__WXOSX_COCOA__  -g -W -Wall -Wshadow -Wundef -ggdb -fno-inline -fmessage-length=0 -O2  -I/Users/admin/Desktop/aMuleSVN/Build2/wxWidgets-2.9.1/lib/wx/include/osx_cocoa-unicode-static-2.9 -I/Users/admin/Desktop/aMuleSVN/Build2/wxWidgets-2.9.1/include -D_FILE_OFFSET_BITS=64 -D__WXMAC__ -D__WXOSX__ -D__WXOSX_COCOA__  -MT wxcaspix.o -MD -MP -MF ".deps/wxcaspix.Tpo" -c -o wxcaspix.o wxcaspix.cpp; \
then mv -f ".deps/wxcaspix.Tpo" ".deps/wxcaspix.Po"; else rm -f ".deps/wxcaspix.Tpo"; exit 1; fi
g++ -g -W -Wall -Wshadow -Wundef -ggdb -fno-inline -fmessage-length=0 -O2  -I/Users/admin/Desktop/aMuleSVN/Build2/wxWidgets-2.9.1/lib/wx/include/osx_cocoa-unicode-static-2.9 -I/Users/admin/Desktop/aMuleSVN/Build2/wxWidgets-2.9.1/include -D_FILE_OFFSET_BITS=64 -D__WXMAC__ -D__WXOSX__ -D__WXOSX_COCOA__  -bind_at_load -lpthread  -o wxcas  onlinesig.o linuxmon.o wxcas.o wxcasprint.o wxcasframe.o wxcasprefs.o wxcascte.o wxcaspix.o -L/Users/admin/Desktop/aMuleSVN/Build2/wxWidgets-2.9.1/lib   -framework IOKit -framework Carbon -framework Cocoa -framework AudioToolbox -framework System -framework OpenGL -framework QuickTime /Users/admin/Desktop/aMuleSVN/Build2/wxWidgets-2.9.1/lib/libwx_osx_cocoau_adv-2.9.a /Users/admin/Desktop/aMuleSVN/Build2/wxWidgets-2.9.1/lib/libwx_osx_cocoau_core-2.9.a /Users/admin/Desktop/aMuleSVN/Build2/wxWidgets-2.9.1/lib/libwx_baseu_net-2.9.a /Users/admin/Desktop/aMuleSVN/Build2/wxWidgets-2.9.1/lib/libwx_baseu-2.9.a -framework WebKit -lwxregexu-2.9 -lwxtiff-2.9 -lwxjpeg-2.9 -lwxpng-2.9 -lz -lpthread -liconv  
ld: warning: in /System/Library/Frameworks//QuickTime.framework/QuickTime, missing required architecture x86_64 in file
Undefined symbols:
  "_libiconv_open", referenced from:
      wxMBConv_iconv::wxMBConv_iconv(char const*)in libwx_baseu-2.9.a(baselib_strconv.o)
      wxMBConv_iconv::wxMBConv_iconv(char const*)in libwx_baseu-2.9.a(baselib_strconv.o)
      wxMBConv_iconv::wxMBConv_iconv(char const*)in libwx_baseu-2.9.a(baselib_strconv.o)
      wxMBConv_iconv::wxMBConv_iconv(char const*)in libwx_baseu-2.9.a(baselib_strconv.o)
  "_libiconv", referenced from:
      wxMBConv_iconv::GetMBNulLen() const  in libwx_baseu-2.9.a(baselib_strconv.o)
      wxMBConv_iconv::FromWChar(char*, unsigned long, wchar_t const*, unsigned long) constin libwx_baseu-2.9.a(baselib_strconv.o)
      wxMBConv_iconv::FromWChar(char*, unsigned long, wchar_t const*, unsigned long) constin libwx_baseu-2.9.a(baselib_strconv.o)
      wxMBConv_iconv::ToWChar(wchar_t*, unsigned long, char const*, unsigned long) constin libwx_baseu-2.9.a(baselib_strconv.o)
      wxMBConv_iconv::ToWChar(wchar_t*, unsigned long, char const*, unsigned long) constin libwx_baseu-2.9.a(baselib_strconv.o)
      wxMBConv_iconv::wxMBConv_iconv(char const*)in libwx_baseu-2.9.a(baselib_strconv.o)
  "_libiconv_close", referenced from:
      wxMBConv_iconv::~wxMBConv_iconv()in libwx_baseu-2.9.a(baselib_strconv.o)
      wxMBConv_iconv::~wxMBConv_iconv()in libwx_baseu-2.9.a(baselib_strconv.o)
      wxMBConv_iconv::~wxMBConv_iconv()in libwx_baseu-2.9.a(baselib_strconv.o)
      wxMBConv_iconv::~wxMBConv_iconv()in libwx_baseu-2.9.a(baselib_strconv.o)
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[5]: *** [wxcas] Error 1
make[4]: *** [all-recursive] Error 1
make[3]: *** [all-recursive] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Title: Re: Compilation problem
Post by: Kry on October 08, 2010, 11:37:29 PM
That's a funny one, because -liconv is right there at the end of the link command.

Can you post revised versions of every configure/make you're using, what you have compiled, and versions? This way I will review it locally as well, as I have a snow leopard machine next to me.

Title: Re: Compilation problem
Post by: markellos on October 09, 2010, 12:35:26 AM
That's a funny one, because -liconv is right there at the end of the link command.

Can you post revised versions of every configure/make you're using, what you have compiled, and versions? This way I will review it locally as well, as I have a snow leopard machine next to me.



Can you explain me better what you want and how can I obtain it? You don't need only wx and amule version, don't you?
Title: Re: Compilation problem
Post by: Kry on October 09, 2010, 02:56:49 AM
Yous configure commands for both aMule and wx, versions of aMule and wx, and if you installed anything extra on your macosx related to compiling this.
Title: Re: Compilation problem
Post by: markellos on October 09, 2010, 12:46:18 PM
Yous configure commands for both aMule and wx, versions of aMule and wx, and if you installed anything extra on your macosx related to compiling this.

Ok, then: wxWidgets 2.9.1
Code: [Select]
./configure --disable-shared --enable-unicode --disable-debug --disable-debug_gdb --with-libiconv-prefix=/opt/local/var/macports/software/libiconv/1.13.1_0/opt/local --with-osx_cocoa && make
aMule SVN 10306
Code: [Select]
./configure --with-wxdir=/Users/admin/Desktop/aMuleSVN/Build2/wxWidgets-2.9.1  --enable-optimize --with-crypto-prefix=/opt/local  --with-gdlib-config=/opt/local/bin/gdlib-config  --with-libiconv-prefix=/opt/local/var/macports/software/libiconv/1.13.1_0/opt/local/bin --enable-cas --enable-webserver  --enable-amulecmd --enable-amule-gui --enable-wxcas --enable-alc --enable-alcc --enable-amule-daemon --enable-geoip  --with-geoip-lib=/opt/local/var/macports/software/libgeoip/1.4.6_0/opt/local --with-geoip-headers=/opt/local/var/macports/software/libgeoip/1.4.6_0/opt/local/include --enable-geoip-static --enable-debug
Ah I installed the following ports with MacPort:
Code: [Select]
automake binutils flex libpng libcryptopp gd2 libgeoip libupnp
Title: Re: Compilation problem
Post by: Stu Redman on October 09, 2010, 06:52:55 PM
Also I found wx 2.9 doesn't like to be built static. At least not in Linux.
I got similar linker errors in Linux when I tried it with a statically built wx 2.9.
Anyway, your libiconv appears to be located in /opt/local/var/macports/software/libiconv/1.13.1_0/opt/local , but you don't pass this path to your link command so it probably can't find it.
Title: Re: Compilation problem
Post by: markellos on October 10, 2010, 01:17:36 PM
Anyway, your libiconv appears to be located in /opt/local/var/macports/software/libiconv/1.13.1_0/opt/local , but you don't pass this path to your link command so it probably can't find it.

Can you explain me what are the differences between a static and a shared build? How can I pass the path to the link command?
Title: Re: Compilation problem
Post by: Stu Redman on October 10, 2010, 01:49:43 PM
Can you explain me what are the differences between a static and a shared build?
Shared: library code is located in a "dynamic library" (.so, .dll in Windows) which must be present at runtime (and be found by the exec loader, so be in the search path or dynamic lib path). Executables are smaller and link faster.
Static: library code is linked fully into the executable which can be run without extra libs.

Problem I experienced with wx2.9 was that the static libs were linked dynamically themselves or something, so the functions used by the libs were not present when linking aMule.

Quote
How can I pass the path to the link command?
-L/opt/local/var/macports/software/libiconv/1.13.1_0/opt/local
Title: Re: Compilation problem
Post by: GonoszTopi on October 13, 2010, 11:52:28 PM
Code: [Select]
$ LDFLAGS="-L/opt/local/var/macports/software/libiconv/1.13.1_0/opt/local" make
Title: Re: Compilation problem
Post by: markellos on October 15, 2010, 11:52:07 PM
Code: [Select]
$ LDFLAGS="-L/opt/local/var/macports/software/libiconv/1.13.1_0/opt/local" make
Ok I tried this command both with SVN 10306 and 10313 and in both cases failed with the same error. I post it here:
Code: [Select]
g++     -o amuleweb -bind_at_load -lpthread -L../../libs/common -L../../libs/ec/cpp -L/opt/local/lib  -L/opt/local/lib   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 -L/Users/admin/Desktop/aMuleSVN/Build3/wxWidgets-2.9.1/lib   -framework IOKit -framework Carbon -framework Cocoa -framework AudioToolbox -framework System -framework OpenGL -framework QuickTime -lwx_baseu_net-2.9 -lwx_baseu-2.9   -lz -lreadline -lpng12  ../../../intl/libintl.a -liconv -lupnp -lthreadutil -lixml   
ld: warning: in /System/Library/Frameworks//QuickTime.framework/QuickTime, missing required architecture x86_64 in file
Undefined symbols:
  "_iconv_close", referenced from:
      __nl_free_domain_conv in libintl.a(loadmsgcat.o)
  "_iconv_open", referenced from:
      __nl_init_domain_conv in libintl.a(loadmsgcat.o)
      __nl_init_domain_conv in libintl.a(loadmsgcat.o)
  "_iconv", referenced from:
      __nl_find_msg in libintl.a(dcigettext.o)
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[4]: *** [amuleweb] Error 1
make[3]: *** [all-recursive] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2


Do I need to perform some sort of clean up very time I try to compile aMule or wx?
Title: Re: Compilation problem
Post by: Kry on October 16, 2010, 12:42:44 AM
do a

make clean

, then run that command again.
Title: Re: Compilation problem
Post by: Kry on October 16, 2010, 12:43:51 AM
Actually, I'm not even sure what's going on, because you don't get the LDFLAGS content on your link. I'll try to look into it this weekend.
Title: Re: Compilation problem
Post by: markellos on October 16, 2010, 12:04:58 PM
do a

make clean

, then run that command again.

same errors...
Title: Re: Compilation problem
Post by: GonoszTopi on October 16, 2010, 10:06:07 PM
Ok, please try CXXFLAGS instead of LDFLAGS. If that doesn't work either, you can still try passing these flags to make by issuing
Code: [Select]
$ make LDFLAGS=...
Title: Re: Compilation problem
Post by: markellos on October 17, 2010, 02:07:16 AM
CXXFLAGS didn't work (the usual error). The bypass didn't   work either but with these error:
Code: [Select]
-lfontconfig -lfreetype -lpng12 -lz -liconv 
i686-apple-darwin10-gcc-4.2.1: ...: No such file or directory
make[5]: *** [cas] Error 1
make[4]: *** [all-recursive] Error 1
make[3]: *** [all-recursive] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
Title: Re: Compilation problem
Post by: Stu Redman on October 17, 2010, 12:16:45 PM
Please post at least the full command causing the error and not just the last wrapped line.  ::)
Title: Re: Compilation problem
Post by: markellos on October 17, 2010, 12:31:26 PM
Code: [Select]
./configure --with-wxdir=/Users/admin/Desktop/aMuleSVN/Build4/wxWidgets-2.9.1  --enable-optimize --with-crypto-prefix=/opt/local  --with-gdlib-config=/opt/local/bin/gdlib-config  --with-libiconv-prefix=/opt/local/var/macports/software/libiconv/1.13.1_0/opt/local/bin --enable-cas --enable-webserver  --enable-amulecmd --enable-amule-gui --enable-wxcas --enable-alc --enable-alcc --enable-amule-daemon --enable-geoip  --with-geoip-lib=/opt/local/var/macports/software/libgeoip/1.4.6_0/opt/local --with-geoip-headers=/opt/local/var/macports/software/libgeoip/1.4.6_0/opt/local/include --enable-geoip-static --enable-debug

Code: [Select]
make LDFLAGS=...
Title: Re: Compilation problem
Post by: GonoszTopi on October 19, 2010, 07:43:19 PM
I meant to replace "..." with the actual path, which I couldn't c&p there (using my mobile phone to access the internet at that time).
So, the actual command should look like
Code: [Select]
$ make LDFLAGS="-L/opt/local/var/macports/software/libiconv/1.13.1_0/opt/local"
Title: Re: Compilation problem
Post by: markellos on October 21, 2010, 04:00:12 PM
same identical error...
Title: Re: Compilation problem
Post by: GonoszTopi on October 22, 2010, 09:29:59 AM
Ok, then, please try this last one:
Code: [Select]
$ ./configure LDFLAGS="-L/opt/local/var/macports/software/libiconv/1.13.1_0/opt/local" ...
$ make
Please replace "..." in the configure command line with your other parameters you used to give configure.
Title: Re: Compilation problem
Post by: markellos on October 26, 2010, 12:02:58 PM
No dice. I've given up on it..  :'(  :'(
Title: Re: Compilation problem
Post by: Kry on October 26, 2010, 07:01:47 PM
I suggest you look back here by next monday, chanceas are I just made everything work on XCode and compiling aMule will be just opening the project and clicking "build".
Title: Re: Compilation problem
Post by: Stu Redman on October 26, 2010, 10:17:01 PM
next monday
;D
Title: Re: Compilation problem
Post by: markellos on October 27, 2010, 02:25:16 AM
wow! I'll be here!
Title: Re: Compilation problem
Post by: markellos on November 09, 2010, 02:12:37 PM
kry, have you had some problems?
Title: Re: Compilation problem
Post by: Stu Redman on November 09, 2010, 09:56:52 PM
next monday
;D
;D
Title: Re: Compilation problem
Post by: Kry on November 10, 2010, 07:03:50 AM
I'm working on it - I have decided to take a different approach due to xcode not supporting SCM dependencies, so I'm adding a script to bootstrap the libraries before compiling. I'll post here when I'm done.