Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 550776

Summary: sys-devel/crossdev: wrong sizes for void* & size_t on x86_64-linux-uclibc
Product: Gentoo Linux Reporter: Sven E. <dark>
Component: [OLD] DevelopmentAssignee: Embedded Gentoo Team <embedded>
Status: RESOLVED FIXED    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: build.log

Description Sven E. 2015-05-29 20:45:19 UTC
dev-libs/libffi-3.2.1 fails to cross compile against uClibc when it tries to assemble win32.S. This seems quite logical as I am cross compiling for amd64.

Reproducible: Always

Steps to Reproduce:
1. Have a uclibc amd64 cross toolchain at hand
2. Try building libffi

Actual Results:  
build failure

Expected Results:  
clean build

Whilst assembling win32.S gcc bails out with invalid instruction suffix errors. Seems legit as I am crosscompiling for amd64.

libffi checks the value of ac_cv_sizeof_size_t and as this yields 4 a 32 Bit platform is assumed.

ac_cv_sizeof_size_t is set to 4 in the site scripts of crossdev (/usr/share/crossdev/include/site/x86_64-linux-uclibc). I crosscompiled a short dummy prog that printfs sizeof(size_t) and to no surprize the value is 8. Changing the value in the site script from 4 to 8 gives a clean build of libffi.
Comment 1 Mike Gilbert gentoo-dev 2015-05-30 00:20:25 UTC
Attach a build log.
Comment 2 Sven E. 2015-05-30 03:41:36 UTC
Created attachment 404318 [details]
build.log
Comment 3 Sven E. 2015-05-30 03:53:13 UTC
Configurte.ac#176:
 i?86-*-* | x86_64-*-*)
TARGETDIR=x86
if test $ac_cv_sizeof_size_t = 4; then
case "$host" in
*-gnux32)
TARGET=X86_64
;;
*)
TARGET=X86
;;
esac
else
TARGET=X86_64;
fi
;;

vs.

/usr/share/crossdev/include/site/x86_64-linux-uclibc:
ac_cv_sizeof_size_t=4
-----------------------------------------------------
Yes the testing in cofigure.ac is certainly not the best and no size_t is not 4 but 8 on x86_64.
Comment 4 SpanKY gentoo-dev 2015-05-30 09:05:47 UTC
(In reply to Sven E. from comment #3)

thanks fixed here:
http://gitweb.gentoo.org/proj/crossdev.git/commit/?id=92d8d087d6131a80704a27f5aafd91112c976465
Comment 5 Sven E. 2015-05-30 21:26:47 UTC
(In reply to SpanKY from comment #4)
> (In reply to Sven E. from comment #3)
> 
> thanks fixed here:
> http://gitweb.gentoo.org/proj/crossdev.git/commit/
> ?id=92d8d087d6131a80704a27f5aafd91112c976465

Thanks for fixing void* size aswell, struck me later that day during the python build.