Roy Rankin wrote, at 09/07/2008 12:56 PM +9:00:
Below is what looks like the relevant part of the build log. Any suggestions on why this is failing on the ppc but not on x86_64 and i386?
Regards, Roy Rankin
g++ -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -o .libs/gpsim main.o -pthread ../src/.libs/libgpsim.so ../cli/.libs/libgpsimcli.so ../gui/.libs/libgpsimgui.so ../eXdbm/.libs/libgpsim_eXdbm.so -lstdc++ -lgthread-2.0 -lrt -lgtkextra-x11-2.0 -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 -lpopt ../cli/.libs/libgpsimcli.so: undefined reference to `rl_getc_function' ../cli/.libs/libgpsimcli.so: undefined reference to `rl_attempted_completion_function' ../cli/.libs/libgpsimcli.so: undefined reference to `rl_forced_update_display' ../cli/.libs/libgpsimcli.so: undefined reference to `rl_completion_matches' ../cli/.libs/libgpsimcli.so: undefined reference to `rl_callback_handler_remove' ../cli/.libs/libgpsimcli.so: undefined reference to `rl_callback_read_char' ../cli/.libs/libgpsimcli.so: undefined reference to `rl_callback_handler_install' ../cli/.libs/libgpsimcli.so: undefined reference to `add_history' collect2: ld returned 1 exit status
Well, with a patch the build succeeds: http://koji.fedoraproject.org/koji/taskinfo?taskID=811499 srpm is available from: http://koji.fedoraproject.org/scratch/mtasaka/task_811499/
Without the patch, build.logs show the difference between x86_64 and ppc like: ---------------------------------------------------------- -checking for ppc-redhat-linux-gnu-gcc... +checking for x86_64-redhat-linux-gnu-gcc... no checking for gcc... gcc @@ -130,34 +130,68 @@ checking for unistd.h... yes checking for GNU Readline library, version 2.0 or newer... -no (it is present but too old to use) +yes, installed version is 5.2
So by some reason libreadline.so is not found or so. ----------------------------------------------------------
I tried to print out what config.log says and it is here: http://koji.fedoraproject.org/koji/taskinfo?taskID=811491
build.log shows: ---------------------------------------------------------- configure:3864: gcc -o conftest -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 conftest.c -lreadline >&5 conftest.c: In function 'main': conftest.c:31: warning: implicit declaration of function 'readline' conftest.c:32: warning: implicit declaration of function 'rl_completion_append_character' /usr/bin/ld: /tmp/ccBR9DBS.o(.text+0x20): unresolvable R_PPC_REL24 relocation against symbol `rl_completion_append_character' /tmp/ccBR9DBS.o: In function `main': /builddir/build/BUILD/gpsim-0.22.0/conftest.c:32: relocation truncated to fit: R_PPC_REL24 against symbol `rl_completion_append_character' defined in .sdata section in /usr/lib/gcc/ppc64-redhat-linux/4.3.2/../../../../lib/libreadline.so /usr/bin/ld: final link failed: Nonrepresentable section on output collect2: ld returned 1 exit status configure:3870: $? = 1 configure: failed program was: | /* confdefs.h. */ <snip> | int | main () | { | | /* function-body */ | readline(0); | rl_completion_append_character(0); | | ; | return 0; | }
However, in readline.h rl_completion_append_character is just "extern int" and this is actually wrong.
Applying a patch against acinclude.m4 is needed. If you don't want to call autoconf, modify configure directly.
Regards, Mamoru