aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Pages: [1] 2 3

Author Topic: Compilation problems on Solaris 10 u8  (Read 19980 times)

vdb

  • Full Member
  • ***
  • Karma: 1
  • Offline Offline
  • Posts: 215
Compilation problems on Solaris 10 u8
« on: November 15, 2009, 03:17:42 PM »

I do hope somebody can help me out here. For specific reasons I have installed a machine with Solaris 10 u8. But to compile and run aMule on it is becoming a bit of a struggle.

I have downloaded and compiled wxWidgets 2.8.10 with GTK2, and also compiled Cryptopp 5.6.0. Both seemed to compile without error. Now I try to compile aMule and it gives the me this output:
  Configure script has finished system check.

  Configured aMule 2.2.6 for 'i386-pc-solaris2.10'.

  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?               no
  Should aMule be compiled with UPnP support?                no
  Should aMule be compiled with IP2country support?          no
  Should aMule monolithic application be built?              yes
  Should aMule daemon version be built?                      no
  Should aMule remote gui be built? (EXPERIMENTAL)           no
  Crypto++ library/headers style?                            sources

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

  **** aMule WebServer ****
  Should aMule WebServer be built?                           no

  **** 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.10 (gtk2,shared)
                                       crypto++              5.6.0 (sources, in )
                                       libintl               system
                                       zlib                  1.2.3

So configure works out that everything necessary is here.

The actual compilation, using "gmake" runs until the linking of aMule:
<snip>
Compiling TerminationProcess.cpp
Compiling TerminationProcessAmuleweb.cpp
Compiling UserEvents.cpp
Compiling OtherFunctions.cpp
Compiling NetworkFunctions.cpp
Linking amule
Undefined                       first referenced
 symbol                             in file
CMSG_LEN                            /opt/csw/lib/libgio-2.0.so.0
CMSG_SPACE                          /opt/csw/lib/libgio-2.0.so.0
ld: fatal: Symbol referencing errors. No output written to amule
collect2: ld returned 1 exit status
gmake[3]: *** [amule] Error 1
gmake[2]: *** [all-recursive] Error 1
gmake[1]: *** [all-recursive] Error 1
gmake: *** [all] Error 2

Anybody have an idea what is wrong?

The odd thing is that this compilation actually did work earlier. But I think I decided to recompile wxWidgets for some reason, with different options. Could that be my problem, that I recompiled with the configure option "--with-GTK2"?

And before you ask, the /opt/csw/lib is in the LD_LIBRARY_PATH environment variable.
Logged
A waste is a terrible thing to mind.

skolnick

  • Global Moderator
  • Hero Member
  • *****
  • Karma: 24
  • Offline Offline
  • Posts: 1188
  • CentOS 6 User
Re: Compilation problems on Solaris 10 u8
« Reply #1 on: November 16, 2009, 05:45:50 AM »

Hi!

There are two things I would like to point:

1. There's an entry on the wiki about compiling aMule on solaris: http://wiki.amule.org/index.php/HowTo_compile_on_Solaris
2. It seems strange that the linking process is trying to link against libgio in /opt/csw instead of using the one included in Solaris.

I'll try to setup a VM with solaris 10 U8 and see if I can get the same problem.

Regards.
Logged

vdb

  • Full Member
  • ***
  • Karma: 1
  • Offline Offline
  • Posts: 215
Re: Compilation problems on Solaris 10 u8
« Reply #2 on: November 16, 2009, 07:10:54 PM »

Yes, I know about that Wiki entry, and without it I would not even have made it this far I'd say. Thanks for that.

The reason it may link against /opt/csw rather than /opt/sfw may be the order in which I have put them into the environment:
CPPFLAGS='-I/usr/local/include -I/opt/csw/include -I/usr/sfw/include'
LDFLAGS='-L/usr/local/lib -R/usr/local/lib -L/opt/csw/lib -R/opt/csw/lib -L/usr/sfw/lib -R/usr/sfw/lib'
LD_LIBRARY_PATH=/usr/local/lib:/opt/csw/lib:/usr/sfw/lib:/usr/lib

PATH=/opt/csw/bin:/usr/sbin:/usr/bin:/usr/dt/bin:/usr/openwin/bin:/usr/ccs/bin:/usr/sfw/bin:/usr/local/bin

Logged
A waste is a terrible thing to mind.

vdb

  • Full Member
  • ***
  • Karma: 1
  • Offline Offline
  • Posts: 215
Re: Compilation problems on Solaris 10 u8
« Reply #3 on: November 16, 2009, 07:26:26 PM »

When I wrote my reply I started to think that changing the order of the includes and such could make a difference and indeed it does. Now I have another interesting error, can't even get through configure:
configure:2116: $? = 0
configure:2118: g++ -v </dev/null >&5
Reading specs from /usr/sfw/lib/gcc/i386-pc-solaris2.10/3.4.3/specs
Configured with: /builds/sfw10-gate/usr/src/cmd/gcc/gcc-3.4.3/configure --prefix=/usr/sfw --with-as=/usr/sfw/bin/gas --with-gnu-as --with-ld=/usr/ccs/bin/ld --without-gnu-ld --enable-languages=c,c++ --enable-shared
Thread model: posix
gcc version 3.4.3 (csl-sol210-3_4-branch+sol_rpath)
configure:2121: $? = 0
configure:2123: g++ -V </dev/null >&5
g++: `-V' option must have argument
configure:2126: $? = 1
configure:2149: checking for C++ compiler default output file name
configure:2152: g++  -I/usr/local/include I/usr/sfw/include -I/opt/csw/include -L/usr/local/lib -R/usr/local/lib -L/usr/sfw/lib -R/usr/sfw/lib -L/opt/csw/lib -R/opt/csw/lib conftest.cc  -lrt >&5
g++: I/usr/sfw/include: No such file or directory
configure:2155: $? = 1
configure: failed program was:
| /* confdefs.h.  */
|
| #define PACKAGE_NAME "aMule"
| #define PACKAGE_TARNAME "amule"
| #define PACKAGE_VERSION "2.2.6"
| #define PACKAGE_STRING "aMule 2.2.6"
| #define PACKAGE_BUGREPORT "admin@amule.org"
| #define PACKAGE "amule"
| #define VERSION "2.2.6"
| /* end confdefs.h.  */
|
| int
| main ()
| {
|
|   ;
|   return 0;
| }
configure:2194: error: C++ compiler cannot create executables
See `config.log' for more details.

## ---------------- ##

This is with the following environment:
CPPFLAGS='-I/usr/local/include I/usr/sfw/include -I/opt/csw/include'
LDFLAGS='-L/usr/local/lib -R/usr/local/lib -L/usr/sfw/lib -R/usr/sfw/lib -L/opt/csw/lib -R/opt/csw/lib'
LD_LIBRARY_PATH=/usr/local/lib:/usr/sfw/lib:/usr/lib:/opt/csw/lib
PATH=/usr/sbin:/usr/bin:/usr/dt/bin:/usr/openwin/bin:/usr/sfw/bin:/usr/local/bin:/usr/csw/bin

So I reckon that maybe one of the variables must have /opt/csw before /opt/sfw, and another one use the reverse order. But which one should be wich?

Logged
A waste is a terrible thing to mind.

GonoszTopi

  • The current man in charge of most things.
  • Administrator
  • Hero Member
  • *****
  • Karma: 169
  • Offline Offline
  • Posts: 2685
Re: Compilation problems on Solaris 10 u8
« Reply #4 on: November 16, 2009, 10:57:01 PM »

CPPFLAGS='-I/usr/local/include I/usr/sfw/include -I/opt/csw/include'
You're missing a '-' sign.
Code: [Select]
CPPFLAGS='-I/usr/local/include I/usr/sfw/include -I/opt/csw/include'
------------------------------^
Logged
concordia cum veritate

vdb

  • Full Member
  • ***
  • Karma: 1
  • Offline Offline
  • Posts: 215
Re: Compilation problems on Solaris 10 u8
« Reply #5 on: November 18, 2009, 01:21:06 PM »

Indeed I did mis that minus.

However, now I see the following at the end of configure:
config.status: creating po/Makefile
config.status: executing denoiser commands
Unrecognized command:        /^MULEC\(XX\)\?FLAGS/! b 9
Unrecognized command:        /^MULEC\(XX\)\?FLAGS/! b 9
Unrecognized command:        /^MULEC\(XX\)\?FLAGS/! b 9
Unrecognized command:        /^MULEC\(XX\)\?FLAGS/! b 9
Unrecognized command:        /^MULEC\(XX\)\?FLAGS/! b 9
Unrecognized command:        /^MULEC\(XX\)\?FLAGS/! b 9
Unrecognized command:        /^MULEC\(XX\)\?FLAGS/! b 9
Unrecognized command:        /^MULEC\(XX\)\?FLAGS/! b 9
Unrecognized command:        /^MULEC\(XX\)\?FLAGS/! b 9
Unrecognized command:        /^MULEC\(XX\)\?FLAGS/! b 9
Unrecognized command:        /^MULEC\(XX\)\?FLAGS/! b 9
Unrecognized command:        /^MULEC\(XX\)\?FLAGS/! b 9
Unrecognized command:        /^MULEC\(XX\)\?FLAGS/! b 9
Unrecognized command:        /^MULEC\(XX\)\?FLAGS/! b 9
Unrecognized command:        /^MULEC\(XX\)\?FLAGS/! b 9
Unrecognized command:        /^MULEC\(XX\)\?FLAGS/! b 9
Unrecognized command:        /^MULEC\(XX\)\?FLAGS/! b 9
Unrecognized command:        /^MULEC\(XX\)\?FLAGS/! b 9
Unrecognized command:        /^MULEC\(XX\)\?FLAGS/! b 9
Unrecognized command:        /^MULEC\(XX\)\?FLAGS/! b 9
Unrecognized command:        /^MULEC\(XX\)\?FLAGS/! b 9
Unrecognized command:        /^MULEC\(XX\)\?FLAGS/! b 9
Unrecognized command:        /^MULEC\(XX\)\?FLAGS/! b 9
Unrecognized command:        /^MULEC\(XX\)\?FLAGS/! b 9
Unrecognized command:        /^MULEC\(XX\)\?FLAGS/! b 9
Unrecognized command:        /^MULEC\(XX\)\?FLAGS/! b 9
Unrecognized command:        /^MULEC\(XX\)\?FLAGS/! b 9
Unrecognized command:        /^MULEC\(XX\)\?FLAGS/! b 9
Unrecognized command:        /^MULEC\(XX\)\?FLAGS/! b 9
Unrecognized command:        /^MULEC\(XX\)\?FLAGS/! b 9
Unrecognized command:        /^MULEC\(XX\)\?FLAGS/! b 9
Unrecognized command:        /^MULEC\(XX\)\?FLAGS/! b 9
Unrecognized command:        /^MULEC\(XX\)\?FLAGS/! b 9
Unrecognized command:        /^MULEC\(XX\)\?FLAGS/! b 9


  Configure script has finished system check.

  Configured aMule 2.2.6 for 'i386-pc-solaris2.10'.

  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?               no
  Should aMule be compiled with UPnP support?                no
  Should aMule be compiled with IP2country support?          no
  Should aMule monolithic application be built?              yes
  Should aMule daemon version be built?                      no
  Should aMule remote gui be built? (EXPERIMENTAL)           no
  Crypto++ library/headers style?                            sources

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

  **** aMule WebServer ****
  Should aMule WebServer be built?                           no

  **** 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.10 (gtk2,shared)
                                       crypto++              5.6.0 (sources, in )
                                       libintl               included
                                       zlib                  1.2.3

These de-noiser commands, are they necessary?
Logged
A waste is a terrible thing to mind.

vdb

  • Full Member
  • ***
  • Karma: 1
  • Offline Offline
  • Posts: 215
Re: Compilation problems on Solaris 10 u8
« Reply #6 on: November 18, 2009, 01:27:21 PM »

Guess they are not really important, but I end up with the same error:

xWidgets-2.8.10/lib -pthreads -L/usr/local/lib -R/usr/local/lib -L/opt/csw/lib -R/opt/csw/lib -L/usr/sfw/lib -R/usr/sfw/lib  -L/usr/X11R6/lib  -L/usr/openwin/lib  -Wl,-R,/export/home/emule/compile/wxWidgets-2.8.10/lib -lwx_gtk2u_adv-2.8 -lwx_gtk2u_core-2.8 -lwx_baseu_net-2.8 -lwx_baseu-2.8     -lgen  -lrt
Undefined                       first referenced
 symbol                             in file
FT_Select_Size                      /opt/csw/lib/libfontconfig.so.1
CMSG_LEN                            /opt/csw/lib/libgio-2.0.so.0
CMSG_SPACE                          /opt/csw/lib/libgio-2.0.so.0
ld: fatal: Symbol referencing errors. No output written to amule
collect2: ld returned 1 exit status
gmake[3]: *** [amule] Error 1
gmake[3]: Leaving directory `/export/home/emule/compile/aMule-2.2.6/src'
gmake[2]: *** [all-recursive] Error 1
gmake[2]: Leaving directory `/export/home/emule/compile/aMule-2.2.6/src'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/export/home/emule/compile/aMule-2.2.6'
gmake: *** [all] Error 2
Logged
A waste is a terrible thing to mind.

vdb

  • Full Member
  • ***
  • Karma: 1
  • Offline Offline
  • Posts: 215
Re: Compilation problems on Solaris 10 u8
« Reply #7 on: November 18, 2009, 01:30:23 PM »

And one other thing, I only have one libgio-2.0.so.0:

-bash-3.00$ find / -name libgio-2.0.so.0
find: cannot read dir /data/postgresql: Permission denied
/opt/csw/lib/libgio-2.0.so.0

There is no "Solaris" version?
« Last Edit: November 20, 2009, 05:27:39 PM by vdb »
Logged
A waste is a terrible thing to mind.

GonoszTopi

  • The current man in charge of most things.
  • Administrator
  • Hero Member
  • *****
  • Karma: 169
  • Offline Offline
  • Posts: 2685
Re: Compilation problems on Solaris 10 u8
« Reply #8 on: November 18, 2009, 10:56:54 PM »

About denoiser: you can "get rid of it" by passing --with-denoise-level=0 to configure (which is default for SVN tarballs). Although I tried to make the script as portable as possible, seems like it's not enough. :(
Logged
concordia cum veritate

vdb

  • Full Member
  • ***
  • Karma: 1
  • Offline Offline
  • Posts: 215
Re: Compilation problems on Solaris 10 u8
« Reply #9 on: November 20, 2009, 05:35:11 PM »

I did find some reference to my problem, I think, but since I only follow cookbooks to get things compiled I have no idea where to place this:

+++ src/fdpass.C       2008-08-09 00:41:29.000000000 +0000
 =20
 -#ifndef CMSG_LEN // CMSG_SPACE && CMSG_LEN are rfc2292 extensions to unix
 +// CMSG_SPACE & CMSG_LEN are rfc2292 extensions to unix
 +#ifndef CMSG_SPACE
 +# define CMSG_SPACE(len) (sizeof (cmsghdr) + len)
 +#endif
 +
 +#ifndef CMSG_LEN
  # define CMSG_LEN(len) (sizeof (cmsghdr) + len)
  #endif
 =20
 
Obviously this code snippet is totally out of context and meant for a completely different application, but could this be the answer if I insert it into some file?


Another post I found, about compiling Python on Solaris 8, suggested the following:
 "I set HAVE_FD_TRANSFER = 0 and now that is working."

Any idea if aMule uses that macro?
« Last Edit: November 20, 2009, 05:43:21 PM by vdb »
Logged
A waste is a terrible thing to mind.

Stu Redman

  • Administrator
  • Hero Member
  • *****
  • Karma: 214
  • Offline Offline
  • Posts: 3739
  • Engines screaming
Re: Compilation problems on Solaris 10 u8
« Reply #10 on: November 20, 2009, 07:12:52 PM »

CMSG_LEN is a symbol referenced in an external lib, and not a preprocessor constant. It's the linker that complains, not the compiler. So I don't think that could help.
Logged
The image of mother goddess, lying dormant in the eyes of the dead, the sheaf of the corn is broken, end the harvest, throw the dead on the pyre -- Iron Maiden, Isle of Avalon

skolnick

  • Global Moderator
  • Hero Member
  • *****
  • Karma: 24
  • Offline Offline
  • Posts: 1188
  • CentOS 6 User
Re: Compilation problems on Solaris 10 u8
« Reply #11 on: November 21, 2009, 03:36:05 AM »

OK, I just updated my wiki entry about compiling aMule on Solaris (English only, I don't know German) with some tips and tricks, and tested it with Solaris 10 U8, and I got aMule to compile. Please check again the wiki, maybe you made something different that will not let aMule compile.

Edit: It compiles, but amuled and amule segfault on start, so there's something definitely wrong with my process of compiling. I'll recheck and see what can it be.
« Last Edit: November 21, 2009, 03:46:00 AM by skolnick »
Logged

vdb

  • Full Member
  • ***
  • Karma: 1
  • Offline Offline
  • Posts: 215
Re: Compilation problems on Solaris 10 u8
« Reply #12 on: November 21, 2009, 01:05:51 PM »

Yeah, that's basically where I was the first time after I followed your Wiki entry, aMule compiled but segfaulted and left me with nice core dumps.

Since then however I started making changes which made it so that the compilation didn't work, so I'll have to get back to the original configuration. Maybe the real difference between then and now is that I started to include "--enable-debug" and "--disable-optimize".

But even using your complete configure line I just can't get rid of this libgio symbol error. What package could I have added that changed the environment?


Update: If I put /opt/csw/bin as the first entry in my PATH the de-noiser commands actually do work. The linker still fails though.
But even then the configure script still can't find "iconv", even though it's clearly located in /opt/cws/bin and I can call it from the command line. Another mystery?
« Last Edit: November 21, 2009, 02:24:41 PM by vdb »
Logged
A waste is a terrible thing to mind.

skolnick

  • Global Moderator
  • Hero Member
  • *****
  • Karma: 24
  • Offline Offline
  • Posts: 1188
  • CentOS 6 User
Re: Compilation problems on Solaris 10 u8
« Reply #13 on: November 21, 2009, 04:44:11 PM »

I am working on that right now. Some years ago (like 2 or 3) I remember I had the exact same issue (solaris compiled but segfaulted). It was somehow related to libintl and libiconv, but I cannot find my notes where I documented how to solve it. I'll try to get a solution, and will post here and update the wiki.

Regards.
Logged

vdb

  • Full Member
  • ***
  • Karma: 1
  • Offline Offline
  • Posts: 215
Re: Compilation problems on Solaris 10 u8
« Reply #14 on: November 21, 2009, 06:10:06 PM »

I did some more testing with other configure options, because until now I used only the bare minimum of aMule's. And now when I include "--enable-wxcas" I get exactly the same linker error:

Building libmulecommon.a
Compiling cas.c
Compiling configfile.c
Compiling functions.c
Compiling graphics.c
Compiling html.c
Compiling lines.c
Linking cas
Compiling onlinesig.cpp
Compiling linuxmon.cpp
Compiling wxcas.cpp
Compiling wxcasprint.cpp
Compiling wxcasframe.cpp
Compiling wxcasprefs.cpp
Compiling wxcascte.cpp
Compiling wxcaspix.cpp
Linking wxcas
Undefined                       first referenced
 symbol                             in file
CMSG_LEN                            /opt/csw/lib/libgio-2.0.so.0
CMSG_SPACE                          /opt/csw/lib/libgio-2.0.so.0
ld: fatal: Symbol referencing errors. No output written to wxcas
collect2: ld returned 1 exit status
gmake[5]: *** [wxcas] Error 1
gmake[4]: *** [all-recursive] Error 1
gmake[3]: *** [all-recursive] Error 1
gmake[2]: *** [all-recursive] Error 1
gmake[1]: *** [all-recursive] Error 1
gmake: *** [all] Error 2

So the error does NOT occur when it links "cas", but it does when it links "wxcas". Ergo, there must be something with the wxWidget compilation or installation of mine.

I realise that we are diverging a bit in problems: Not being able to compile vs segfaulting after compilation.

Let's keep this thread about getting the compiler to finish?
Logged
A waste is a terrible thing to mind.
Pages: [1] 2 3