On Fri, Jan 25, 2008 at 10:45 PM, Albertson, Brett <bretta at consonus.com>
wrote:

> I agree, but we need to patch /opt/kdebld/lib/pkgbuild-1.2.0/pkgtool.pl
> and pkgbuild.pl because they have this code:
>
> sub init () {
>    $topdir = rpm_spec::get_topdir ($build_engine, \...@predefs);
>    $arch = `uname -p`;
>
> Then, a lot of the automated build works off of $arch.  I get some
> ELFCLASS64 errors during the build process.
>
> Brett Albertson
> bretta at consonus.com
> 919-379-8449
>
>

Hi Brett,

i think you are wrong in your statement. I'm pretty sure that main
wrong-doer is libtool. Here is the example:

flac

pkgbuild: (cd 
/home/luc/packages/BUILD/FOSSflac-1.1.2/amd64/FLAC/1.1.2/src/libFLAC++;
/bin/bash ../../libtool --mode=relink /opt/SUNWspro/bin/CC -I../..
-I./include -I../../include -O2 -DNDEBUG -D_REENTRANT -D__EXTENSIONS__
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_POSIX_PTHREAD_SEMANTICS
-DSOLARIS -DSOLARIS10 -DNDEBUG -DNO_DEBUG -D_UNICODE -DUNICODE
-D_RWSTD_REENTRANT -D_XOPEN_SOURCE=500 -D_XPG5 -I/opt/foss/include
-I/opt/foss/include/ansi -library=no%Cstd
-features=anachronisms,except,rtti,export,extensions,nestedaccess,tmplife,tmplrefstatic
-instances=global -template=geninlinefuncs -s -xlang=c99
-xustr=ascii_utf16_ushort -Qoption ccfe -features=gcc -Qoption ccfe
++boolflag:sunwcch=false -xF=%none -xbuiltin=%all -xinline=%auto
-xprefetch=auto -xprefetch_auto_type=indirect_array_access
-xprefetch_level=3 -xalias_level=compatible -xO3 -xregs=no%frameptr -xjobs=2
-Kpic -xrestrict=%all -xthreadvar=%all -z combreloc -z redlocsym -z
nodefaultlib -z ignore -z now -z rescan -z absexec -xipo=0
-xldscope=symbolic -xlibmil -s -xtarget=opteron -m64 -xchip=opteron
-xcache=64/64/2:1024/64/16 -lm -ldl -lc -lpthread -lposix4 -lrt -mt
-L/opt/foss/lib/amd64 -L/usr/lib/amd64 -R/opt/foss/lib/amd64
-R/usr/lib/amd64 -Y P,/opt/foss/lib/amd64:/usr/lib/amd64 -i -L/usr/lib/amd64
-R/usr/lib/amd64 -Bdynamic -lCrun -lstdcxx -Y
P,/opt/foss/lib/amd64:/usr/lib/amd64 -i -L/usr/lib/amd64 -R/usr/lib/amd64
-Bdynamic -lCrun -lstdcxx -L/opt/foss/lib/amd64 -L/usr/lib/amd64
-R/opt/foss/lib/amd64 -R/usr/lib/amd64 -z combreloc -z redlocsym -z
nodefaultlib -z ignore -z now -z rescan -z absexec -xipo=0
-xldscope=symbolic -xlibmil -s -xtarget=opteron -m64 -xchip=opteron
-xcache=64/64/2:1024/64/16 -lm -ldl -lc -lpthread -lposix4 -lrt -mt -o
libFLAC++.la -rpath /opt/foss/lib/amd64 -version-info 5:0:0 file_decoder.lo
file_encoder.lo metadata.lo seekable_stream_decoder.lo
seekable_stream_encoder.lo stream_decoder.lo stream_encoder.lo
../libFLAC/libFLAC.la -inst-prefix-dir /var/tmp/pkgbuild-luc/FOSSflac-
1.1.2-build)

pkgbuild: /opt/SUNWspro/bin/CC   -G  -nolib -hlibFLAC++.so.5 -o
.libs/libFLAC++.so.5.0.0   .libs/file_decoder.o .libs/file_encoder.o
.libs/metadata.o .libs/seekable_stream_decoder.o
.libs/seekable_stream_encoder.o .libs/stream_decoder.o
.libs/stream_encoder.o  -R/opt/foss/lib/amd64 -R/usr/lib/amd64
-library=no%Cstd -L/opt/foss/lib/amd64 -L/usr/lib/amd64 -lCrun -lstdcxx -lm
-ldl -lc -lpthread -lposix4 -lrt -L/var/tmp/pkgbuild-luc/FOSSflac-
1.1.2-build/opt/foss/lib/amd64 -lFLAC
-features=anachronisms,except,rtti,export,extensions,nestedaccess,tmplife,tmplrefstatic
-instances=global -template=geninlinefuncs -s -xlang=c99
-xustr=ascii_utf16_ushort -Qoption ccfe -features=gcc -Qoption ccfe
-xF=%none -xbuiltin=%all -xinline=%auto -xprefetch=auto
-xprefetch_auto_type=indirect_array_access -xprefetch_level=3
-xalias_level=compatible -xO3 -xregs=no%frameptr -xjobs=2 -xrestrict=%all
-xthreadvar=%all -z combreloc -z redlocsym -z nodefaultlib -z ignore -z now
-z rescan -z absexec -xipo=0 -xldscope=symbolic -xlibmil -s -xtarget=opteron
-xchip=opteron -xcache=64/64/2:1024/64/16 -i -i -z combreloc -z redlocsym -z
nodefaultlib -z ignore -z now -z rescan -z absexec -xipo=0
-xldscope=symbolic -xlibmil -s -xtarget=opteron -xchip=opteron
-xcache=64/64/2:1024/64/16

pkgbuild: ld: fatal: file .libs/file_decoder.o: wrong ELF class: ELFCLASS64
pkgbuild: ld: fatal: File processing errors. No output written to
.libs/libFLAC++.so.5.0.0
pkgbuild: libtool: install: error: relink `libFLAC++.la' with the above
command before installing it
pkgbuild: make[3]: *** [install-libLTLIBRARIES] Error 1


As you can see. pkgbuild passes right flags to libtool (with -m64 and right
paths of course), BUT run libtool strips -m64 flag and  ooops error  has
been appeared

This typically happen for C++.


Next example  .... this typically happen for ASM

imlib2


pkgbuild:  /opt/SUNWspro/bin/cc -DHAVE_CONFIG_H -I. -I. -I../..
-I/opt/foss/include/freetype2 -I/opt/foss/include -I/usr/X11/include -I.
-I../..
-I../.. -D_REENTRANT -D__EXTENSIONS__ -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64
-D_POSIX_PTHREAD_SEMANTICS -DSOLARIS -DSOLARIS10 -DNDEBUG -DNO_DEBUG
-D_UNICODE
-DUNICODE -D_XOPEN_SOURCE=600 -D_XPG6 -D_POSIX_C_SOURCE=200112L
-D__XOPEN_OR_POSIX -D_STRICT_STDC -D_STRICT_STDC__ -D_STDC_C99
-I/opt/foss/include -std=gnu99 -Xc -errshort=full -errfmt=error
-errwarn=%none
-s -xcsi -xustr=ascii_utf16_ushort -xalias_level=std -features=extinl
-xF=%none
-xbuiltin=%all -xinline=%auto -xprefetch=auto
-xprefetch_auto_type=indirect _array_access -xprefetch_level=3 -xsafe=mem
-xthreadvar=%all -z combreloc -z redlocsym -z nodefaultlib -z ignore -z now
-z
rescan -z absexec -xipo=0 -xldscope=symbolic -xlibmil -s -xO3
-xregs=no%frameptr
-xjobs=2 -Kpic -xrestrict=%all -xipo=0 -xtarget=opteron -m64 -xchip=opteron
-xcache=64/64/2:1024/64/16 -lm -ldl -lc -lpthread -lposix4 -lrt -mt
-L/opt/foss/lib/amd64 -L/usr/lib/amd64 -R/opt/foss/lib/amd64
-R/usr/lib/amd64 -c
updates.c  -KPIC -DPIC -o .libs/updates.o
pkgbuild: cc: Warning: illegal option -d=gnu99
pkgbuild: /bin/bash ../../libtool --mode=compile /opt/SUNWspro/bin/cc
 -I../..
-I../.. -c -o amd64_blend.lo amd64_blend.S
pkgbuild:  /opt/SUNWspro/bin/cc -I../.. -I../.. -c amd64_blend.S  -KPIC
-DPIC -o
.libs/amd64_blend.o
pkgbuild: Assembler:
pkgbuild:       "amd64_blend.S", line 45 : Illegal mnemonic
pkgbuild:       Near line: "    pushq %rbp"


libtool is being nasty. it removes all the 64-bit flags and compiles it as
32-bit, which of course makes all the %rbp, %rcx, etc registers illegal


So if exists any big and great libtool hacker is welcome, because have  not
any clue , how can fix it in right place. I tried many  test  and  I'm a
libtool-dumb probably.


Best regards




-- 
Lukas 'Luc' Oboril
IRC nickname: luc^ at freenode


When dealing with people, let us remember we are not dealing with creatures
of logic. We are dealing with creatures of emotions, creatures bristling
with prejudices and motivated by pride and vanity.   Dale Carnegie
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://mail.opensolaris.org/pipermail/kde-discuss/attachments/20080127/b801db05/attachment.html>

Reply via email to