LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.

Notices


Reply
  Search this Thread
Old 05-24-2005, 03:29 PM   #1
xushi
Senior Member
 
Registered: Jun 2003
Location: UK
Distribution: Gentoo
Posts: 1,288

Rep: Reputation: 45
painful experiences with compiling...


Alright.. this is a cry for help here. I'm having two problems for the past week that have been driving me mad. I've been having alot of trouble compilng certain applications in Solaris 10.. PArticularely two which give me a hell of alot of common problems.

The errors i get are similar to
Code:
ds   -lwx_base-2.6 -lwx_base_net-2.6  -lz  -lresolv -lnsl -lbfd -liberty -lgen
Undefined                       first referenced
 symbol                             in file
nanosleep                           amuled-AICHSyncThread.o  (symbol belongs to implicit dependency /usr/lib/librt.so.1)
ld: fatal: Symbol referencing errors. No output written to amuled
collect2: ld returned 1 exit status
make[3]: *** [amuled] Error 1
make[3]: Leaving directory `
or
Code:
Undefined                       first referenced
 symbol                             in file
XParseGeometry                      amule-amule-gui.o  (symbol belongs to implic it dependency /usr/lib/libX11.so.4)
ld: fatal: Symbol referencing errors. No output written to amule
collect2: ld returned 1 exit status
I've googled alot about this, but the two answers i got either say that i should use GNU's ld (which i am), or to add something to the makefile which i couldn't really figure out. Heck i don't even know why i'm getting this problem in the first place..



Another problem i'm getting is when i'm trying to compile wxWindows (wxGTK 2.6.0) with GTK2 support. I am absolutely certain i have GTK2 installed. I asked in an irc chat for some help, everything they asked me to do showed that i have GTK2 installed, and that it should work.. but it just doesn't.. When i ./configure , i get this
Code:
checking for GTK+ - version >= 2.0.0... no
*** Could not run GTK+ test program, checking why...
*** The test program failed to compile or link. See the file config.log for the
*** exact error that occured. This usually means GTK+ is incorrectly installed.
configure: error:
The development files for GTK+ were not found. For GTK+ 2, please
ensure that pkg-config is in the path and that gtk+-2.0.pc is
installed. For GTK+ 1.2 please check that gtk-config is in the path,
and that the version is 1.2.3 or above. Also check that the
libraries returned by 'pkg-config gtk+-2.0 --libs' or 'gtk-config
--libs' are in the LD_LIBRARY_PATH or equivalent.
Ii know for a fact that GTK2 is installed, along with the devl package,
Code:
root@yooniks:/download/wxGTK-2.6.0# pkginfo | grep gtk
system      CSWgtk                           gtk - the Gimp ToolKit library, libgtk
application CSWgtk2                          gtk2 - GTK+, The GIMP Toolkit
application CSWgtkspell                      gtkspell - Spell checking enhancement for the GtkTextView widget
Code:
# find / -name \*gtk+-2.0.pc -print
/usr/lib/sparcv9/pkgconfig/gtk+-2.0.pc
/usr/lib/pkgconfig/gtk+-2.0.pc
Code:
# which pkg-config
/usr/bin/pkg-config
I'm using the following prefexes
./configure --prefix=/usr --with-gtk --enable-unicode --disable-compat24 --enable-optimise && make

I tried adding --with-gtk-exec-prefix=/usr/bin
--with-gtk-prefix=/usr
--with-gtk-prefix=/opt/csw

and none of them solve the problem =/

My config.log is here
http://xushi.co.uk/xushi/config.log

A friend told me this,
Quote:
If you check the config.log file, you will see that when it checks for GTK2 and fails, the reason for failing is not the absence of GTK2, is that in the compilation command of the test program, there is an "unknown option m" specified. Searching in google, I found that seems to be a thread model in some architecture/OS, but in solaris should be pthread instead of m, so that's the failure (at least on my system, YMMV) that could be a start point for your investigation on this GTK2 issue.
I'm really confused here.. The two problems are holding me back, and i don't know where to start.. Any help would be greatly appreciated.

Thanks.
 
Old 05-24-2005, 11:36 PM   #2
technopark02
Member
 
Registered: Feb 2005
Distribution: Solaris 8 - 11, JDS Linux 3.0
Posts: 99

Rep: Reputation: 15
From your message, it appears that you were trying to use the copy of GTK+, that you installed under /opt/csw. But from the log, it appears that the make system is trying to use another copy of GTK+, that it found under /usr/lib Or /opt/sfw. So, make sure to point it to the correct version (ie., version of your choice) of the library. Also if there is a choice to disable the gtk+ test, disable it during configure; and you can fix it later with run-time linker's search path, LD_LIBRARY_PATH

I found the following web page with instructions to compile Amule on Solaris, in their web site: http://www.amule.org/wiki/index.php/...ile_on_Solaris Please have a look at that (if you haven't already)
 
Old 05-25-2005, 04:18 AM   #3
xushi
Senior Member
 
Registered: Jun 2003
Location: UK
Distribution: Gentoo
Posts: 1,288

Original Poster
Rep: Reputation: 45
Quote:
Originally posted by technopark02
From your message, it appears that you were trying to use the copy of GTK+, that you installed under /opt/csw. But from the log, it appears that the make system is trying to use another copy of GTK+, that it found under /usr/lib Or /opt/sfw.
Could it be that it's getting confused between CSWgtk and CSWgtk2 ?

Quote:
So, make sure to point it to the correct version (ie., version of your choice) of the library.
On a side note, to compile it and link it against GTK2, i'm using the following
./configure --prefix=/usr --with-gtk --enable-unicode --disable-compat24 --enable-optimise && make

Quote:
I found the following web page with instructions to compile Amule on Solaris, in their web site: http://www.amule.org/wiki/index.php/...ile_on_Solaris Please have a look at that (if you haven't already)
I'm actually helping him with that page . But after googling, i noticed this problem isn't just on aMule, its on several other programs as well.
 
Old 05-26-2005, 05:39 AM   #4
xushi
Senior Member
 
Registered: Jun 2003
Location: UK
Distribution: Gentoo
Posts: 1,288

Original Poster
Rep: Reputation: 45
Ok thanks for the info, it made a few things more clear, but still i have the same problem.. bare with me, and tell me if i'm doing anything wrong =)

Quote:
Originally posted by technopark02
From your message, it appears that you were trying to use the copy of GTK+, that you installed under /opt/csw. But from the log, it appears that the make system is trying to use another copy of GTK+, that it found under /usr/lib Or /opt/sfw.
Ok, i've gone through my system again, I found SUNWGtk which i didn;t know i had before, and i killed it.

Now i only have CSWgtk2, which is what i need.
Code:
xushi@yooniks:~/public_html/mp3$ which pkg-config
/usr/bin/pkg-config
xushi@yooniks:~/public_html/mp3$ ldd /usr/bin/pkg-config
        libc.so.1 =>     /lib/libc.so.1
        libm.so.2 =>     /lib/libm.so.2
        /platform/SUNW,Ultra-60/lib/libc_psr.so.1
# pkg-config --version
0.15.0
Also, to test and see if pkg-config has all the libraries linked properly, i scanned which ones it uses
Code:
# pkg-config gtk+-2.0 --libs
-lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lmlib -lpangoxft-1.0 -lpangox-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -lglib-2.0
Afterwards, i searched one of the libraries to see its location, and i got
Code:
# find / -name \*gdk_pixbuf-2.0\* -print
/usr/lib/sparcv9/libgdk_pixbuf-2.0.so
/usr/lib/sparcv9/libgdk_pixbuf-2.0.so.0
/usr/lib/sparcv9/libgdk_pixbuf-2.0.so.0.400.9
/usr/lib/libgdk_pixbuf-2.0.so
/usr/lib/libgdk_pixbuf-2.0.so.0
/usr/lib/libgdk_pixbuf-2.0.so.0.400.9
/usr/share/man/sman3/libgdk_pixbuf-2.0.3
/opt/csw/lib/libgdk_pixbuf-2.0.la
/opt/csw/lib/libgdk_pixbuf-2.0.so
/opt/csw/lib/libgdk_pixbuf-2.0.so.0
/opt/csw/lib/libgdk_pixbuf-2.0.so.0.600.4
root@yooniks:/download/wxGTK-2.6.0#
So i can safely assume that i have the libraries in /usr/lib, and that if i have that in my library path, all should work.
Code:
# crle

Configuration file [version 4]: /var/ld/ld.config
  Default Library Path (ELF):   /lib:/usr/lib:/opt/csw/lib
  Trusted Directories (ELF):    /lib/secure:/usr/lib/secure  (system default)

Command line:
  crle -c /var/ld/ld.config -l /lib:/usr/lib:/opt/csw/lib
But...... i'm still getting the problem =/

Quote:
Also if there is a choice to disable the gtk+ test, disable it during configure; and you can fix it later with run-time linker's search path, LD_LIBRARY_PATH
Ok, i've tried that,
./configure --prefix=/usr --with-gtk --enable-unicode --disable-compat24 --enable-optimise --disable-gtktest

the restults
Code:
Configured wxWidgets 2.6.0 for `sparc-sun-solaris2.10'

  Which GUI toolkit should wxWidgets use?                 GTK+ 2
  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.2      no
                                       wxWidgets 2.4      no
  Which libraries should wxWidgets use?
                                       jpeg               sys
                                       png                sys
                                       regex              builtin
                                       tiff               sys
                                       zlib               sys
                                       odbc               no
                                       expat              sys
                                       libmspack          no
                                       sdl                no
                                       gnomeprint         no
And a nasty error not even 0.1 seconds through the compilation
Code:
root@yooniks:/download/wxGTK-2.6.0# make
./bk-deps gcc -c -o wxregex_regcomp.o -D__WXGTK__ -fPIC -DPIC -DGTK_NO_CHECK_CASTS -Ilib/wx/include/gtk2-unicode-release-2.6 -I./include -mt -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/openwin/include -I/usr/sfw/include -I/usr/sfw/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -isystem /usr/openwin/include -O2 -pthreads -D_REENTRANT -Wall ./src/regex/regcomp.c
cc1: error: invalid option `t'
make: *** [wxregex_regcomp.o] Error 1
EDIT: p.s., my gcc is
Code:
root@yooniks:/download/wxGTK-2.6.0# gcc -v
Reading specs from /usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/specs
Configured with: /gates/sfw10/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)
The new config.log is found here (updated)
http://xushi.co.uk/xushi/config.log

Again, thanks for the help, and i hope this can be solved =)

Last edited by xushi; 05-26-2005 at 05:49 AM.
 
Old 06-02-2005, 08:07 PM   #5
technopark02
Member
 
Registered: Feb 2005
Distribution: Solaris 8 - 11, JDS Linux 3.0
Posts: 99

Rep: Reputation: 15
If the issue is still unresolved:

Did you try to "configure" without any options?

I did (on x86), and in the very first attempt it picked up "motif" for the toolkit. Since the problem is with GTK, then I tried "configure --with-gtk". It is able to configure it properly, but in my case it failed during the compilation of some file. I didn't bother to fix the compilation issue, as I was just trying to reproduce the problem (the compilation issue is easy to fix, I believe).

If you still see the problem in your environment with "configure" and "configure --with-gtk", try to configure with "--with-gtk --with-gtk-prefix=/opt/csw" options. You can add the rest of the options, if it succeeds.

_____
Note:
Irrespective of the OS, it is always good to have only one "clean" copy of the libraries. So, uninstall the unwanted copies of the same library.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Least Painful install of Oracle 9 on RHEL 3? colmmagoo Linux - Software 1 07-30-2004 01:28 PM
The Painful WPC11 Mau Mandriva 1 06-14-2004 05:11 PM
Why is installing drivers so painful? Help! lostchild Mandriva 8 01-26-2004 11:04 AM
RPM (Really Painful Migraine) Problems LinuxBlackBox Linux - Software 4 10-20-2003 04:57 PM
painful sendmail sib_99 Linux - Networking 0 09-25-2003 01:39 PM

LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris

All times are GMT -5. The time now is 09:25 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration