xlC compile errors: undefined symbol (irssi/perl)
 
*
Welcome, Guest. Please login or register. November 21, 2008, 07:22:23 AM


Login with username, password and session length


Pages: [1]   Go Down
  Print  
Author Topic: xlC compile errors: undefined symbol (irssi/perl)  (Read 141 times)
0 Members and 1 Guest are viewing this topic.
LGee
New Member
*
Posts: 3


« Reply #3 on: November 14, 2008, 10:30:00 PM »

Well... it proved easier than I thought.

Here is the recipe:


CC=/usr/vac/bin/cc_r ./configure --disable-ipv6 --prefix=/usr/local --with-perl-staticlib


This will compile just fine if you edit the following file:

src/fe-common/core/printtext.h


and remove the lines 37-57 (tests for the compiler) and the closing #endif on line 116, of course.

Well, running it is far from perfect:

$ irssi
exec(): 0509-036 Cannot load program irssi because of the following errors:
        0509-150   Dependent module libperl.a(libperl.o) could not be loaded.
        0509-022 Cannot load module libperl.a(libperl.o).
        0509-026 System error: A file or directory in the path name does not exist.


However,


 $ LIBPATH=$LIBPATH:/usr/opt/perl5/lib/5.8.2/aix-thread-multi/CORE/ irssi


starts the program.

23:23 CTCP VERSION reply from LGee: irssi v0.8.13-svn - running on AIX 004FF48A4C00
Logged
Michael
Administrator
Hero Member
*****
Posts: 526


« Reply #2 on: November 14, 2008, 04:59:04 PM »

This is what I got to compile last March:
michael@x054:[/data/prj/irssi-0.8.12]irssi -?
Usage:
  irssi [OPTION...]

Help Options:
  -?, --help                  Show help options

Application Options:
  --config=PATH               Configuration file location (~/.irssi/config)
  --home=PATH                 Irssi home dir location (~/.irssi)
  -c, --connect=SERVER        Automatically connect to server/network
  -w, --password=PASSWORD     Autoconnect password
  -p, --port=PORT             Autoconnect port
  -!, --noconnect             Disable autoconnecting
  -n, --nick                  Specify nick to use
  -h, --hostname              Specify host name to use
  -d, --dummy                 Use the dummy terminal mode
  -v, --version               Display irssi version



drwxr-xr-x    5 michael  staff          4096 Mar 21 2008  irssi-0.8.12
-rw-r--r--    1 michael  staff        935918 Mar 21 2008  irssi-0.8.12.tar.bz2
drwxr-xr-x    6 michael  staff          4096 Mar 30 2008  irssi-0.8.13-svn
-rw-r--r--    1 michael  staff       1382591 Mar 30 2008  irssi-20080328.tar.gz


I see the *.13.svn directory as well. Need to check that. I have not worked with it much since then. Maybe the version ending in .12 is better for now.

Logged
Michael
Administrator
Hero Member
*****
Posts: 526


« Reply #1 on: November 14, 2008, 03:53:46 PM »

Well I have compiled irssi - but maybe using gcc.

The way some opensource packages are developed makes porting hard. libtool often seems to get in the way.

Recently I was compiling apache2, and it failed with gcc. A bad library search path. Using xlC - older than yours though, version 8 I think, it compiled fine.

Generally, the fix is to specify environment variables to ./configure. But each package requires it's own approach. Unfortunately.

I shall be on the road the coming week, so I wont have time to look at how I built irssi myself, but I'll let you know asap.
Logged
LGee
New Member
*
Posts: 3


« on: November 14, 2008, 01:10:02 PM »

Hello,

this is my first post here ;-)

I have started compiling irssi on AIX 5.3 TL8 with xlC 10.1.

The following components are already compiled with exit 0:

- pkg-config-0.23
- gettext-0.17
- glib-2.19.0 # this was a hard one, I had to comment out a few lines in the code to get it working ;-)

I have problems with

irssi-0.8.13-svn (2008-11-12)

In src/perl/common, make fails with missing symbols:

Making all in perl
        for dir in common irc ui textui; do  cd $dir &&  if [ ! -f Makefile ]; then  /usr/bin/perl Makefile.PL INSTALLDIRS=perl PREFIX=/usr/local;  fi &&  (make CC="xlc_r -D_ALL_SOURCE" CCFLAGS="-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=16384 -qnoansialias -DUSE_NATIVE_DLOPEN -DNEED_PTHREAD_INIT -q32 -D_LARGE_FILES -qlonglong  -I/usr/opt/perl5/lib/5.8.2/aix-thread-multi/CORE  -g"  ||  make CC="xlc_r -D_ALL_SOURCE" CCFLAGS="-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=16384 -qnoansialias -DUSE_NATIVE_DLOPEN -DNEED_PTHREAD_INIT -q32 -D_LARGE_FILES -qlonglong  -I/usr/opt/perl5/lib/5.8.2/aix-thread-multi/CORE  -g" ) &&  cd ..;  done
        rm -f blib/arch/auto/Irssi/Irssi.so
        LD_RUN_PATH="" ld  -bhalt:4 -bM:SRE -bI:/usr/opt/perl5/lib/5.8.2/aix-thread-multi/CORE/perl.exp -bE:Irssi.exp -bnoentry -lpthreads -lc_r Channel.o  Core.o  Expando.o  Ignore.o  Irssi.o  Log.o  Masks.o  Query.o  Rawlog.o  Server.o  Settings.o  -o blib/arch/auto/Irssi/Irssi.so
ld: 0711-317 ERROR: Undefined symbol: .irssi_ref_object
ld: 0711-317 ERROR: Undefined symbol: .nicklist_getnicks
... (snip)
ld: 0711-317 ERROR: Undefined symbol: .perl_get_api_version
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
make: 1254-004 The error code from the last command is 8.


I have collected a few hints found on the web (including adding -bnoquiet as suggested ;-), but unfortunately, I can only test them in the evening on my machine.

As I see, this linker problem is quite common on AIX. So the real question is if there is a 'generic approach' to handling this problem.

regards
LGee

Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM
Page created in 1.146 seconds with 20 queries.




eXTReMe Tracker

Terms of Use and Privacy and Security Policies
Copyright 2001-2008 Michael Felt and ROOTVG.NET