Hello Ken,

Thursday, October 11, 2007, 9:13:06 PM, you wrote:

KM> On Thu, Oct 11, 2007 at 06:30:59PM +0200, Jacek Herold wrote:
>> Hello
>> 
>> I'm trying to compile the gettext package and following error appears:
>> 
>> 
>> gcc -m32 -mcpu=ultrasparc -mtune=ultrasparc -fopenmp -g -O2 -o 
>> .libs/msgmerge msgmerge-msgmerge.o msgmerge-msgl-fsearch.o 
>> msgmerge-plural-count.o -fopenmp  ./.libs/libgettextsrc.so
>> /sources/gettext-0.16.1/gettext-tools/gnulib-lib/.libs/libgettextlib.so -lc 
>> -lm
>> /usr/lib64/gcc/sparc64-unknown-linux-gnu/4.2.1/../../../../lib/libgomp.so: 
>> undefined reference to `__sync_val_compare_and_swap_4'
>> /usr/lib64/gcc/sparc64-unknown-linux-gnu/4.2.1/../../../../lib/libgomp.so: 
>> undefined reference to `__sync_lock_test_and_set_4'
>> /usr/lib64/gcc/sparc64-unknown-linux-gnu/4.2.1/../../../../lib/libgomp.so: 
>> undefined reference to `__sync_bool_compare_and_swap_4'
>> /usr/lib64/gcc/sparc64-unknown-linux-gnu/4.2.1/../../../../lib/libgomp.so: 
>> undefined reference to `__sync_add_and_fetch_4'
>> collect2: ld returned 1 exit status
>> make[4]: *** [msgmerge] Error 1
KM>  I don't have any sparc systems, but google suggests these __sync_
KM> functions are internal to gcc.  On this powerpc box a quick
KM>  find /usr/lib/gcc/*/* | xargs strings | grep '__sync_'
KM> finds most, or all, of them.  What it doesn't do is tell me the
KM> name of the library they are in.

KM>  So, it looks as if either gcc or ld has a problem.  You seem to be
KM> installing the basic system software, so you should have 'find' and
KM> 'xargs' installed.  But, you need to restrict the search to 32-bit
KM> libraries - possibly, those are in /32 subdirectories.  If you
KM> logged the install of gcc, you should be able to identify the
KM> relevant directories easily.  The first suggestion, in case you
KM> haven't guessed, is that they either didn't get installed, or were
KM> overwritten by 64-bit versions.  I can vaguely remember having that
KM> sort of problem on multilib, probably when a new version of gcc came
KM> out.

KM>  If they are there, I'm not the best person to advise on how 'ld'
KM> searches, but hopefully somebody knows.

KM> ?en

OK I finally found the solution - i suppose. The problem is really
with references, in file /mnt/clfs/usr/lib64/libgomp.so.1.0.0 those
symbols are not present (see below):

[EMAIL PROTECTED]:~$ readelf -a /mnt/clfs/usr/lib/libgomp.so.1.0.0 |grep sync
00015b60  00000a15 R_SPARC_JMP_SLOT  00000000   __sync_val_compare_and + 0
00015bfc  00003215 R_SPARC_JMP_SLOT  00000000   __sync_lock_test_and_s + 0
00015c98  00007415 R_SPARC_JMP_SLOT  00000000   __sync_bool_compare_an + 0
00015ca4  00007515 R_SPARC_JMP_SLOT  00000000   __sync_add_and_fetch_4 + 0
    10: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND __sync_val_compare_and_sw
    50: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND __sync_lock_test_and_set_
   116: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND __sync_bool_compare_and_s
   117: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND __sync_add_and_fetch_4
   162: 00003ad4   164 FUNC    LOCAL  HIDDEN   10 gomp_ordered_sync
   171: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND __sync_val_compare_and_sw
   211: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND __sync_lock_test_and_set_
   277: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND __sync_bool_compare_and_s
   278: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND __sync_add_and_fetch_4
[EMAIL PROTECTED]:~$

However some symbol exists in the library like __sync_add_and_fetch_4.

It looks rather strange forme but ...

So finaly i fount that if i compile the 32-bit version with
--disable-openmp the libgomp will not be used and the package compile
successfully.


Tell me please if it's a proper solution or not.
-- 
Pozdrawiam,
 Jacek                            mailto:[EMAIL PROTECTED]


 P.S. If there are lack of sparc machine in the community i can
 prepare one in the future. That one i'm operationg on is vero slow
 but i'll buy faster.


----------------------------------------------------------------------
Fajne i smieszne. Zobacz najlepsze filmiki!

>>> http://link.interia.pl/f1bbb

_______________________________________________
Clfs-support mailing list
[email protected]
http://lists.cross-lfs.org/cgi-bin/mailman/listinfo/clfs-support

Reply via email to