pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/44610: multimedia/x264-devel fails to build on sparc/solaris 9 with ABI=64

>Number:         44610
>Category:       pkg
>Synopsis:       multimedia/x264-devel fails to build on sparc/solaris 9 with 
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Feb 20 07:30:00 +0000 2011
>Originator:     Stefan
>Release:        sparc/solaris 9
multimedia/x264-devel fails to build on sparc/solaris 9 with ABI=64 (2010Q4)

libtool: link: gcc -shared -Wl,-z -Wl,text -Wl,-h -Wl, -o 
.libs/  common/.libs/mc.o common/.libs/predict.o 
common/.libs/pixel.o common/.libs/macroblock.o common/.libs/frame.o 
common/.libs/dct.o common/.libs/cpu.o common/.libs/cabac.o 
common/.libs/common.o common/.libs/mdate.o common/.libs/set.o 
common/.libs/quant.o common/.libs/vlc.o encoder/.libs/analyse.o 
encoder/.libs/me.o encoder/.libs/ratecontrol.o encoder/.libs/set.o 
encoder/.libs/macroblock.o encoder/.libs/cabac.o encoder/.libs/cavlc.o 
encoder/.libs/encoder.o encoder/.libs/lookahead.o extras/.libs/getopt.o 
common/sparc/.libs/pixel.o   -lm -lpthread -lrt 
-L/usr/pkgsrc/tmp/multimedia/x264-devel/work/.buildlink/lib -lc  
-Wl,-R/usr/local/lib -mcpu=ultrasparc  
ld: fatal: file common/sparc/.libs/pixel.o: wrong ELF class: ELFCLASS32
ld: fatal: File processing errors. No output written to .libs/
collect2: ld returned 1 exit status
gmake: *** [] Error 1

Under the hood:

<.> /usr/ccs/bin/as -xarch=v8plusa -D__PIC__ common/sparc/pixel.asm -o 
[*] /usr/pkgsrc/tmp/multimedia/x264-devel/work/.wrapper/bin/as 
/usr/pkgsrc/tmp/multimedia/x264-devel/work/.wrapper/bin/as -xarch=v8plusa 
-D__PIC__ common/sparc/pixel.asm -o common/sparc/pixel.o

v8plusa is passed to as. This is so set in configure (grep for v8plusa) and 
must be patched to be set to v9a when ABI=64 is set in mk.conf.

(The assembler file is written with VIS extentions and v9 is not enough. v9a is 

Then, the final link fails as well:

libtool  --mode=link gcc -o x264 x264.lo matroska.lo muxers.lo 
-L/usr/lib -Wl,-R/usr/lib -Wl,-R/usr/local/lib -lm -mcpu=ultrasparc  -lpthread 
-lrt -s
libtool: link: gcc -o .libs/x264 .libs/x264.o .libs/matroska.o .libs/muxers.o 
-Wl,-R/usr/local/lib -mcpu=ultrasparc -s  ./.libs/ 
-L/usr/pkgsrc/tmp/multimedia/x264-devel/work/.buildlink/lib -lm -lpthread -lrt  
Undefined                       first referenced
 symbol                             in file
logf                                ./.libs/
getopt_long                         .libs/x264.o

logf is not available on solaris 9. Not 100% sure, but I think it's available 
on solaris 10.

logf is from float to float while log is from double to double. How about using 
log instead of logf, at least for solaris 9?

configure sets HAVE_GETOPT_LONG to 0, so Makefile is adding 

ifneq ($(HAVE_GETOPT_LONG),1)
SRCS += extras/getopt.c

getopt_long is not included in extra/getopt.o object file. It's only included 
if _MSC_VER is defined (see extras/getopt.c source code). _MSC_VER seems to be 
the microsoft c compiler version number macro. Setting it to a random value 
(#define) makes the library link under solaris :)


Home | Main Index | Thread Index | Old Index