aMule Forum

English => Compilation problems => Topic started by: bubez811 on May 26, 2016, 10:23:34 PM

Title: Compiling aMule svn wxWidgets-3.0.2 OSX 10.11
Post by: bubez811 on May 26, 2016, 10:23:34 PM
Hi, i'm going crazy, there are 4 days i'm trying to compile amule on osx without success.
I need amule amuleweb amuled and amulegui.
wxWidget is compiled with this options:

Code: [Select]
export MY_SDKROOT=`xcode-select -print-path`
export THE_SDKPATH="${MY_SDKROOT}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk"
export MY_MIN_TARGET=10.11


./configure --enable-debug --enable-debug_gdb --enable-debug_info --disable-optimise --with-osx_cocoa --enable-intl --disable-shared --enable-unicode --disable-dependency_tracking --disable-universal --enable-universal-binary=i386,x86_64 --with-zlib --with-libpng --with-libiconv --with-libiconv-prefix=/dir/where/is/installed/libiconv --with-subdirs --with-macosx-sdk=${THE_SDKPATH} -with-macosx-version-min=${MY_MIN_TARGET}

and the patch changeset_2a13ad64d85213846147c31f095e7b419487f677.diff

aumule with this configure:

Code: [Select]
./configure --disable-debug --with-wxdir=../wxWidgets-3.0.2/ --with-crypto-prefix=/opt/local/ --with-gdlib-config=/opt/local/bin/gdlib-config --with-libiconv-prefix=/opt/local --with-toolkit=osx_cocoa --enable-webserver --enable-amulecmd --enable-amule-gui --enable-amule-daemon
and the output is:

Code: [Select]
Configure script has finished system check.

  Configured aMule SVN (rev. 10931) for 'x86_64-apple-darwin15.5.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?                    no
  Should aMule be compiled with profiling?                   no
  Should aMule be compiled with optimizations?               no
  Should aMule be compiled with UPnP support?                yes
  Should aMule be compiled with IP2country support?          no
  Should aMule monolithic application be built?              yes
  Should aMule daemon version be built?                      yes
  Should aMule remote gui be built?                          yes

  **** 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
  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             3.0.2 (osx_cocoa,static)
                             crypto++              5.6.3 (in /opt/local/)
                             libupnp               1.6.19
                             libintl               included
                             libpng                1.6.21
                             zlib                  1.2.5


 *** Warnings during configuration ***

* Cannot link to the library containing the bfd functions.

the error is this:

Code: [Select]
Undefined symbols for architecture x86_64:
  "_iconv", referenced from:
      wxMBConv_iconv::wxMBConv_iconv(char const*) in libwx_baseu-3.0.a(baselib_strconv.o)
      wxMBConv_iconv::ToWChar(wchar_t*, unsigned long, char const*, unsigned long) const in libwx_baseu-3.0.a(baselib_strconv.o)
      wxMBConv_iconv::FromWChar(char*, unsigned long, wchar_t const*, unsigned long) const in libwx_baseu-3.0.a(baselib_strconv.o)
      wxMBConv_iconv::GetMBNulLen() const in libwx_baseu-3.0.a(baselib_strconv.o)
     (maybe you meant: __ZTI14wxMBConv_iconv, __ZTS14wxMBConv_iconv , __ZNK14wxMBConv_iconv11GetMBNulLenEv , __ZN14wxMBConv_iconvD2Ev , __ZN14wxMBConv_iconvC2EPKc , __ZN14wxMBConv_iconvC1EPKc , __ZNK14wxMBConv_iconv4IsOkEv , __ZN14wxMBConv_iconv16ms_wcCharsetNameE , __ZNK14wxMBConv_iconv9FromWCharEPcmPKwm , __ZN14wxMBConv_iconvD0Ev , __Z18new_wxMBConv_iconvPKc , __ZNK14wxMBConv_iconv7ToWCharEPwmPKcm , __ZTV14wxMBConv_iconv , __ZN14wxMBConv_iconv14ms_wcNeedsSwapE , __ZN14wxMBConv_iconvD1Ev , __ZNK14wxMBConv_iconv5CloneEv )
  "_iconv_close", referenced from:
      wxMBConv_iconv::~wxMBConv_iconv() in libwx_baseu-3.0.a(baselib_strconv.o)
  "_iconv_open", referenced from:
      wxMBConv_iconv::wxMBConv_iconv(char const*) in libwx_baseu-3.0.a(baselib_strconv.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [amule] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

please help me i think it is impossible to can't compile amule on OSx 10.11
Title: Re: Compiling aMule svn wxWidgets-3.0.2 OSX 10.11
Post by: GonoszTopi on June 02, 2016, 10:47:07 PM
Do you have iconv installed?

I'm not familiar with OSX, but some development packages of iconv should be installed for xcode. The linker tries to resolve symbols that appear to be from the iconv library, but it cannot find the library...
Title: Re: Compiling aMule svn wxWidgets-3.0.2 OSX 10.11
Post by: bubez811 on June 03, 2016, 08:33:01 AM
Yes, i think it's an architecture problem.
today update: semi success!!

finally amule is compiled here what i've done:

macport

Code: [Select]
sudo port install automake flex gettext jpeg gd2 libgeoip pkgconfig
Homebrew

Code: [Select]
brew install cryptopp libpng
wxwidgets 3.0.2 with the patch changeset_2a13ad64d85213846147c31f095e7b419487f677.diff

Code: [Select]
./configure --enable-shared --enable-monolithic --with-osx_cocoa CXX='clang++ -std=c++11 -stdlib=libc++' CC=clang --with-macosx-version-min=10.11 --disable-debug & make
amule

Code: [Select]
./configure --with-wx-config=../wxWidgets-3.0.2/wx-config  --enable-optimize --with-crypto-prefix=/usr/local/Cellar/cryptopp/5.6.3_1  --with-gdlib-config=/opt/local/bin/gdlib-config  --with-libiconv-prefix=/opt/local --enable-webserver  --enable-amulecmd --enable-amule-gui --enable-wxcas --enable-alc --enable-alcc --enable-amule-daemon --enable-geoip  --with-geoip-lib=/opt/local/lib --with-geoip-headers=/opt/local/include  --with-libpng-prefix=/usr/local/Cellar/libpng/1.6.21 --with-libpng-config=/usr/local/Cellar/libpng/1.6.21/bin/libpng-config --enable-amule-daemon --disable-upnp & make
and finally
Code: [Select]
./src/utils/scripts/MacOSX/application_packager.sh      <---- is this passage correct?

Now i have amule, but the last command fail to create amulegui
another problem, amuleweb is running but i can't access to localhost:4711

any ideas?

this is the output of the application_packager.sh:

Code: [Select]
bubez81:amule-e87f035 michele$ ./src/utils/scripts/MacOSX/application_packager.sh

Step 1: Cleaning bundles... Done

Step 2.1: Copying aMule to app bundle... Done
Step 2.2: Copying aMuleGUI to app bundle... cp: directory aMuleGUI.app/Contents/MacOS does not exist
Done

Step 3: Installing translations to app bundle... ~/Downloads/Tentativi/amule-e87f035/po ~/Downloads/Tentativi/amule-e87f035
~/Downloads/Tentativi/amule-e87f035
Done

Step 4: Copying libs to Framework
    wxWidgets...
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool: can't open file: aMuleGUI.app/Contents/MacOS/amulegui (No such file or directory)
Libs copy done.

Step 5: Update libs info
~/Downloads/Tentativi/amule-e87f035/aMule.app/Contents ~/Downloads/Tentativi/amule-e87f035
    Updating libixml.2.dylib
    Updating aMule lib info for libixml.2.dylib
    Updating libthreadutil.2.dylib
    Updating aMule lib info for libthreadutil.2.dylib
    Updating libupnp.3.dylib
    Updating aMule lib info for libupnp.3.dylib
    Updating libwx_osx_cocoau-3.0.0.2.0.dylib
    Updating aMule lib info for libwx_osx_cocoau-3.0.0.2.0.dylib
./src/utils/scripts/MacOSX/application_packager.sh: line 106: pushd: aMuleGUI.app/Contents/: No such file or directory
    Updating libixml.2.dylib
    Updating aMule lib info for libixml.2.dylib
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool: can't open file: MacOS/amulegui (No such file or directory)
    Updating libthreadutil.2.dylib
    Updating aMule lib info for libthreadutil.2.dylib
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool: can't open file: MacOS/amulegui (No such file or directory)
    Updating libupnp.3.dylib
    Updating aMule lib info for libupnp.3.dylib
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool: can't open file: MacOS/amulegui (No such file or directory)
    Updating libwx_osx_cocoau-3.0.0.2.0.dylib
    Updating aMule lib info for libwx_osx_cocoau-3.0.0.2.0.dylib
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool: can't open file: MacOS/amulegui (No such file or directory)
Libs info updated, aMule.app and aMuleGUI.app are ready to package.

~/Downloads/Tentativi/amule-e87f035
Creating aMule.zip... Done
Creating aMuleGUI.zip... Done
Title: Re: Compiling aMule svn wxWidgets-3.0.2 OSX 10.11
Post by: GonoszTopi on June 04, 2016, 09:57:50 AM
Now i have amule, but the last command fail to create amulegui

That's because the transition to the git version control system. Unfortunately it doesn't handle empty directories (like Subversion did), and they're now missing from the package. Please try the attached patch which will ensure that the required empty directories exist.
Title: Re: Compiling aMule svn wxWidgets-3.0.2 OSX 10.11
Post by: bubez811 on June 04, 2016, 07:19:27 PM
tnx 1000, now the error is this:
Code: [Select]
./src/utils/scripts/MacOSX/application_packager.sh

Step 1: Cleaning bundles... Done

Step 2.1: Copying aMule to app bundle... Done
Step 2.2: Copying aMuleGUI to app bundle... Done

Step 3: Installing translations to app bundle... ~/Downloads/Tentativi/amule-e87f035/po ~/Downloads/Tentativi/amule-e87f035
~/Downloads/Tentativi/amule-e87f035
Done

Step 4: Copying libs to Framework
    wxWidgets...
Libs copy done.

Step 5: Update libs info
~/Downloads/Tentativi/amule-e87f035/aMule.app/Contents ~/Downloads/Tentativi/amule-e87f035
    Updating libixml.2.dylib
    Updating aMule lib info for libixml.2.dylib
    Updating libthreadutil.2.dylib
    Updating aMule lib info for libthreadutil.2.dylib
    Updating libupnp.3.dylib
    Updating aMule lib info for libupnp.3.dylib
    Updating libwx_osx_cocoau-3.0.0.2.0.dylib
    Updating aMule lib info for libwx_osx_cocoau-3.0.0.2.0.dylib
./src/utils/scripts/MacOSX/application_packager.sh: line 113: pushd: aMuleGUI.app/Contents/: No such file or directory
    Updating libixml.2.dylib
    Updating aMule lib info for libixml.2.dylib
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool: can't open file: MacOS/amulegui (No such file or directory)
    Updating libthreadutil.2.dylib
    Updating aMule lib info for libthreadutil.2.dylib
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool: can't open file: MacOS/amulegui (No such file or directory)
    Updating libupnp.3.dylib
    Updating aMule lib info for libupnp.3.dylib
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool: can't open file: MacOS/amulegui (No such file or directory)
    Updating libwx_osx_cocoau-3.0.0.2.0.dylib
    Updating aMule lib info for libwx_osx_cocoau-3.0.0.2.0.dylib
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool: can't open file: MacOS/amulegui (No such file or directory)
Libs info updated, aMule.app and aMuleGUI.app are ready to package.

~/Downloads/Tentativi/amule-e87f035
Creating aMule.zip... Done
Creating aMuleGUI.zip... Done


but amulegui now works! (the icon doesn't work but it's not so important)

and now the last problem...amuleweb...

this is the output of the command:
Code: [Select]
bubez81:amule-e87f035 michele$ /Applications/aMule.app/Contents/MacOS/amuleweb -f /Users/michele/Library/Application\ Support/aMule/amule.conf
This is amuleweb SVN rev. 10931
Enter password for mule connection:

Creating client...
Succeeded! Connection established to aMule SVN
./LibSocketWX.cpp(140): AnyAddress() returned 0.0.0.0

amuleweb take the 100% of the cpu and i can't connect to localhost:4711

Code: [Select]
bubez81:~ michele$ ps aux | grep amule
michele         90939 100,0  0,2  2519956  15928 s000  R+    7:14pm   0:14.53 /Applications/aMule.app/Contents/MacOS/amuleweb -f /Users/michele/Library/Application Support/aMule/amule.conf
michele         90910   3,6  1,1  2631764  96276   ??  S     7:12pm   0:07.21 /Applications/aMule.app/Contents/MacOS/amule -psn_0_680102
michele         90943   0,9  0,0  2435864    784 s002  S+    7:15pm   0:00.00 grep amule
Title: Re: Compiling aMule svn wxWidgets-3.0.2 OSX 10.11
Post by: GonoszTopi on June 04, 2016, 10:55:10 PM
Okay, the packager error can be fixed by applying the below patch:
Code: [Select]
diff --git a/src/utils/scripts/MacOSX/application_packager.sh b/src/utils/scripts/MacOSX/application_packager.sh
index f815856..860c1ad 100755
--- a/src/utils/scripts/MacOSX/application_packager.sh
+++ b/src/utils/scripts/MacOSX/application_packager.sh
@@ -110,6 +110,7 @@ for i in $( ls Frameworks | grep -v CVS); do
                `otool -L MacOS/amulecmd | grep $i | cut -d " " -f 1` \
                @executable_path/../Frameworks/$i MacOS/amulecmd 1> /dev/null 2> /dev/null
 done
+popd
 pushd aMuleGUI.app/Contents/
 for i in $( ls Frameworks | grep -v CVS); do
        echo "    Updating $i"

As for the amuleweb problem, I'll look into it.
Title: Re: Compiling aMule svn wxWidgets-3.0.2 OSX 10.11
Post by: bubez811 on June 05, 2016, 06:34:23 AM
Than you for the interest!!

Now with the two paths the output is this:

Code: [Select]
bubez81:amule-e87f035 michele$ ./src/utils/scripts/MacOSX/application_packager.sh

Step 1: Cleaning bundles... Done

Step 2.1: Copying aMule to app bundle... Done
Step 2.2: Copying aMuleGUI to app bundle... Done

Step 3: Installing translations to app bundle... ~/Downloads/Tentativi/amule-e87f035/po ~/Downloads/Tentativi/amule-e87f035
~/Downloads/Tentativi/amule-e87f035
Done

Step 4: Copying libs to Framework
    wxWidgets...
Libs copy done.

Step 5: Update libs info
~/Downloads/Tentativi/amule-e87f035/aMule.app/Contents ~/Downloads/Tentativi/amule-e87f035
    Updating libixml.2.dylib
    Updating aMule lib info for libixml.2.dylib
    Updating libthreadutil.2.dylib
    Updating aMule lib info for libthreadutil.2.dylib
    Updating libupnp.3.dylib
    Updating aMule lib info for libupnp.3.dylib
    Updating libwx_osx_cocoau-3.0.0.2.0.dylib
    Updating aMule lib info for libwx_osx_cocoau-3.0.0.2.0.dylib
~/Downloads/Tentativi/amule-e87f035
~/Downloads/Tentativi/amule-e87f035/aMuleGUI.app/Contents ~/Downloads/Tentativi/amule-e87f035
    Updating libwx_osx_cocoau-3.0.0.2.0.dylib
    Updating aMule lib info for libwx_osx_cocoau-3.0.0.2.0.dylib
Libs info updated, aMule.app and aMuleGUI.app are ready to package.

~/Downloads/Tentativi/amule-e87f035
Creating aMule.zip... Done
Creating aMuleGUI.zip... Done

all good.

For amuleweb i don't know what to think...no error in verbose mode, simply doesn't work and take 100% cpu

update:
with the option --no-php
Code: [Select]
bubez81:~ michele$ amuleweb -f Library/Application\ Support/aMule/amule.conf --no-php
WARNING: --no-php switch have no effect. Long live PHP
This is amuleweb SVN rev. 10931
Enter password for mule connection:

Creating client...
Succeeded! Connection established to aMule SVN
still doesn't work but the cpu use is normal
Title: Re: Compiling aMule svn wxWidgets-3.0.2 OSX 10.11
Post by: bubez811 on June 06, 2016, 11:22:06 AM
update

now the cpu use is normal btw the port is open:
Code: [Select]
bubez81:~ michele$ nmap localhost -p 4711

Starting Nmap 7.00 ( https://nmap.org ) at 2016-06-06 11:19 CEST
Nmap scan report for localhost (127.0.0.1)
Host is up (0.00027s latency).
Other addresses for localhost (not scanned): ::1
PORT     STATE SERVICE
4711/tcp open  unknown

Nmap done: 1 IP address (1 host up) scanned in 0.31 seconds
can't understand...


anyway here are the link to my versions of aMule and aMuleGUI i386 and x64 if someone is interested

https://www.dropbox.com/s/4hrdc03pspgoqfr/aMule-2.4_Boost_OSXCocoa_i386_x64.zip?dl=0
https://www.dropbox.com/s/myjxfzaltrxpl7t/aMuleGUI-2.4_Boost_OSXCocoa_i386_x64.zip?dl=0
Title: Re: Compiling aMule svn wxWidgets-3.0.2 OSX 10.11
Post by: GonoszTopi on June 07, 2016, 09:37:03 PM
with the option --no-php
[...]
still doesn't work but the cpu use is normal

It's getting more and more interesting... Considering that
Code: [Select]
WARNING: --no-php switch have no effect. Long live PHP
it should not make any difference...
Title: Re: Compiling aMule svn wxWidgets-3.0.2 OSX 10.11
Post by: bubez811 on June 08, 2016, 10:13:20 AM
hahaha in any case now the cpu problem is gone, but the browser can't open the webpage and nothing on the logs.
perhaps it's a bug?