[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Build issues with gettext 0.20.2 and 0.21 on Solaris 10 i386 with 64
From: |
Dagobert Michelsen |
Subject: |
Re: Build issues with gettext 0.20.2 and 0.21 on Solaris 10 i386 with 64 bit |
Date: |
Sun, 22 Nov 2020 12:22:51 +0100 |
Hi Bruno,
Am 17.11.2020 um 22:55 schrieb Bruno Haible <bruno@clisp.org>:
>> I am currently trying to compile the most recent gettext on Solaris 10 and
>> found an issue.
>> The error shows on Solaris 10 i386 64 bit only, sparc and i386 32 bit are
>> not affected:
>>
>> gmake[4]: Entering directory
>> '/home/dam/mgar/pkg/gettext/trunk/work/solaris10-i386/build-isa-amd64/gettext-0.20.2/libtextstyle/adhoc-tests'
>> /opt/csw/bin/gcc-5.5 -DHAVE_CONFIG_H -I. -I.. -I. -I. -I.. -I../lib
>> -I./../lib -DSRCDIR=\"./\" -I/opt/csw/include -O2 -pipe
>> -fno-omit-frame-pointer -m64 -march=opteron -MT hello.o -MD -MP -MF
>> .deps/hello.Tpo -c -o hello.o hello.c
>> mv -f .deps/hello.Tpo .deps/hello.Po
>> /bin/bash ../libtool --tag=CC --mode=link /opt/csw/bin/gcc-5.5 -O2 -pipe
>> -fno-omit-frame-pointer -m64 -march=opteron -m64 -march=opteron
>> -L/opt/csw/lib/64 -o hello hello.o ../lib/libtextstyle.la
>> libtool: link: /opt/csw/bin/gcc-5.5 -O2 -pipe -fno-omit-frame-pointer -m64
>> -march=opteron -m64 -march=opteron -o .libs/hello hello.o -L/opt/csw/lib/64
>> ../lib/.libs/libtextstyle.so -lm -ltermcap -R/opt/csw/lib/64
>> Undefined first referenced
>> symbol in file
>> iconv_ostream_create ../lib/.libs/libtextstyle.so
>
> This symbol is only defined in HAVE_ICONV is set to 1 in config.h.
> Can you search config.log for "checking for iconv" ?
That was a good hint! Indeed iconv is not detected properly on amd64 in the
snapshot 2020-11-16, but it was on 0.20.1. For all other ISAs like sparc,
sparcv9
and i386 the detection works fine for both compared versions.
dam@unstable10x [global]:/home/dam/mgar/pkg/gettext/trunk/work-0.20.1 > find .
-name config.h | xargs grep HAVE_ICONV
./solaris10-i386/build-isa-amd64/gettext-0.20.1/gettext-runtime/config.h:#define
HAVE_ICONV 1
./solaris10-i386/build-isa-amd64/gettext-0.20.1/gettext-runtime/config.h:#define
HAVE_ICONV_H 1
./solaris10-i386/build-isa-amd64/gettext-0.20.1/libtextstyle/config.h:#define
HAVE_ICONV 1
./solaris10-i386/build-isa-amd64/gettext-0.20.1/gettext-tools/config.h:#define
HAVE_ICONV 1
./solaris10-i386/build-isa-amd64/gettext-0.20.1/gettext-tools/config.h:#define
HAVE_ICONV_H 1
dam@unstable10x [global]:/home/dam/mgar/pkg/gettext/trunk > find work -name
config.h | xargs grep HAVE_ICONV
work/solaris10-i386/build-isa-amd64/gettext-2020-11-16/gettext-tools/config.h:/*
#undef HAVE_ICONV */
work/solaris10-i386/build-isa-amd64/gettext-2020-11-16/gettext-tools/config.h:#define
HAVE_ICONV_H 1
work/solaris10-i386/build-isa-amd64/gettext-2020-11-16/gettext-runtime/config.h:/*
#undef HAVE_ICONV */
work/solaris10-i386/build-isa-amd64/gettext-2020-11-16/gettext-runtime/config.h:#define
HAVE_ICONV_H 1
work/solaris10-i386/build-isa-amd64/gettext-2020-11-16/libtextstyle/config.h:/*
#undef HAVE_ICONV */
The failing lines are:
0.20.1: gettext-runtime/config.log
configure:19080: /opt/csw/bin/gcc-5.5 -o conftest -O2 -pipe
-fno-omit-frame-pointer -m64 -march=opteron -I/opt/csw/include -D_REENTRANT
-m64 -march=opteron -L/opt/csw/lib/64 conftest.c /opt/csw/lib/64/libiconv.so
-R/opt/csw/lib/64 >&5
2020-11-16: gettext-runtime/config.log
configure:19878: /opt/csw/bin/gcc-5.5 -o conftest -O2 -pipe
-fno-omit-frame-pointer -m64 -march=opteron -I/opt/csw/include -D_REENTRANT
-m64 -march=opteron -L/opt/csw/lib/64 conftest.c /opt/csw/lib/libiconv.so
-R/opt/csw/lib >&5
which shows that the library found for amd64 is the wrong 32 bit library
/opt/csw/lib/libiconv.so
instead of the 64 bit one.
Further inspection showed that there is code to match the elfclass to the
platform:
++ dir=/opt/csw/lib/64
+ test -n /opt/csw/lib/64
+ test -n so
+ test -f /opt/csw/lib/64/libiconv.so
+ acl_is_expected_elfclass
++ func_elfclass
++ sed -e 's/[ ]//g'
++ od -A n -t d1 -j 4 -N 1
+ test 2 = 1
+ test '$libname$shrext' = '$libname$shrext$versuffix'
+ eval 'library_names="$libname$shrext"'
++ library_names=libiconv.so
+ for f in '$library_names'
+ test -f /opt/csw/lib/64/libiconv.so
+ acl_is_expected_elfclass
++ func_elfclass
++ sed -e 's/[ ]//g'
++ od -A n -t d1 -j 4 -N 1
+ test 2 = 1 -> XXX found was 64 bit but falsely needed is 32 bit
+ test X = X
+ test -f /opt/csw/lib/64/libiconv.a
+ test X '!=' X
+ for additional_libdir_variable in additional_libdir additional_libdir2
additional_libdir3
+ test X = X
+ eval 'dir=$additional_libdir2'
++ dir=/opt/csw/lib
+ test -n /opt/csw/lib
+ test -n so
+ test -f /opt/csw/lib/libiconv.so
+ acl_is_expected_elfclass
I think that HOST_CPU_C_ABI_32BIT is wrongly set on the host with arch i386
although 64 compilation with -m64 was requested which may be somewhere here
https://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob;f=m4/lib-prefix.m4;h=c8a0b464c2804e7f10ed9abcaed5bb43f23b0e49;hb=refs/heads/master#l202
but was not able to fully grasp the m4 expansion and follow up to the wrong
line. Maybe this is enough for you to already know that is going wrong, if
you need more info I will dig deeper in the detection code.
Thanks a lot and best regards
— Dago
--
"You don't become great by trying to be great, you become great by wanting to
do something,
and then doing it so hard that you become great in the process." - xkcd #896
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: Build issues with gettext 0.20.2 and 0.21 on Solaris 10 i386 with 64 bit,
Dagobert Michelsen <=