Bug 207764

Summary: audio/linux-skype_oss_wrapper /compat/linux/usr/bin/gcc: Exec format error
Product: Ports & Packages Reporter: Anton Shterenlikht <as>
Component: Individual Port(s)Assignee: Andriy Voskoboinyk <avos>
Status: Closed Works As Intended    
Severity: Affects Only Me CC: avos, fmyoen
Priority: --- Flags: avos: maintainer-feedback+
Version: Latest   
Hardware: Any   
OS: Any   

Description Anton Shterenlikht 2016-03-07 08:57:30 UTC
FreeBSD 10.3-RC1 #0 r296435
Ports tree at 410508

The package can be installed via pkg, but
trying to build gives:

# make clean all
===>  Cleaning for linux-skype_oss_wrapper-0.1.1
===>  License BSD3CLAUSE accepted by the user
===>   linux-skype_oss_wrapper-0.1.1 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by linux-skype_oss_wrapper-0.1.1 for building
===>  Extracting for linux-skype_oss_wrapper-0.1.1
=> SHA256 Checksum OK for s3erios-skype_oss_wrapper-v0.1.1_GH0.tar.gz.
===>  Patching for linux-skype_oss_wrapper-0.1.1
===>   linux-skype_oss_wrapper-0.1.1 depends on file: /compat/linux/usr/bin/gcc - found
===>  Configuring for linux-skype_oss_wrapper-0.1.1
===>  Building for linux-skype_oss_wrapper-0.1.1
--- skype_oss ---
--- libpulse.o ---
--- skype_oss ---
echo "#!/bin/sh" > skype_oss && echo "LD_LIBRARY_PATH=/compat/linux/lib/skype_oss_wrapper:\$LD_LIBRARY_PATH skype" >> skype_oss && chmod +x skype_oss
--- libpulse.o ---
/compat/linux/usr/bin/gcc -O2 -pipe  -fstack-protector -fno-strict-aliasing   -m32 -fPIC -c libpulse.c -o libpulse.o
ELF binary type "0" not known.
/compat/linux/usr/bin/gcc: Exec format error
*** [libpulse.o] Error code 126

make[1]: stopped in /usr/ports/audio/linux-skype_oss_wrapper/work/skype_oss_wrapper-0.1.1
1 error

I checked my /usr/ports has no local modifications (svn diff && svn status).

Thanks

Anton
Comment 1 Andriy Voskoboinyk freebsd_committer freebsd_triage 2016-03-09 20:54:17 UTC
Try to 'kldload linux' (required by the linux gcc).
Comment 2 fmyoen 2017-04-29 16:36:15 UTC
# uname -a
FreeBSD ... 10.3-RELEASE-p18 FreeBSD 10.3-RELEASE-p18 #0: Tue Apr 11 10:31:00 UTC 2017     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64

# kldstat 
Id Refs Address            Size     Name
 1   45 0xffffffff80200000 17bcab8  kernel
 2    1 0xffffffff819bd000 2fc440   zfs.ko
 3    2 0xffffffff81cba000 6040     opensolaris.ko
 4    2 0xffffffff81cc1000 9af10    linux.ko
 5    3 0xffffffff81d5c000 c128     linux_common.ko
 6    1 0xffffffff81d69000 96d0     if_gre.ko
 7    1 0xffffffff81d73000 4a70     coretemp.ko
 8    1 0xffffffff81d78000 b700     geom_linux_lvm.ko
 9    1 0xffffffff81d84000 1a2b8    fuse.ko
10    1 0xffffffff81d9f000 e14460   nvidia.ko
11    1 0xffffffff82e21000 9faf     linprocfs.ko
12    1 0xffffffff82e2b000 a7c0     tmpfs.ko
13    1 0xffffffff82e36000 56c6     fdescfs.ko
14    1 0xffffffff82e3c000 358d     ums.ko
15    1 0xffffffff82e40000 9f2      green_saver.ko

# cd /usr/ports/net-im/skype4

# make install clean

===>   skype4-4.3.0.37_5,1 depends on file: /usr/local/sbin/pkg - found
...
===> Fetching all distfiles required by skype4-4.3.0.37_5,1 for building
...
===>   skype4-4.3.0.37_5,1 depends on file: /compat/linux/lib/skype_oss_wrapper/libpulse.so.0 - not found
===>  License BSD3CLAUSE accepted by the user
===>   linux-skype_oss_wrapper-0.1.1 depends on file: /usr/local/sbin/pkg - found
=> s3erios-skype_oss_wrapper-v0.1.1_GH0.tar.gz doesn't seem to exist in /usr/ports/distfiles/.
=> Attempting to fetch ...
s3erios-skype_oss_wrapper-v0.1.1_GH0.tar.gz             12 kB   15 MBps 00m00s
===> Fetching all distfiles required by linux-skype_oss_wrapper-0.1.1 for building
===>  Extracting for linux-skype_oss_wrapper-0.1.1
=> SHA256 Checksum OK for s3erios-skype_oss_wrapper-v0.1.1_GH0.tar.gz.
===>  Patching for linux-skype_oss_wrapper-0.1.1
===>   linux-skype_oss_wrapper-0.1.1 depends on package: linux-c6-devtools>0 - not found
...
Installing linux-c6-libgfortran-4.4.7_4...
ELF binary type "3" not known.
/compat/linux/sbin/ldconfig: Exec format error
pkg-static: POST-INSTALL script failed
...
===>   Registering installation for linux-c6-devtools-6.8_10 as automatic
Installing linux-c6-devtools-6.8_10...
ELF binary type "3" not known.
/compat/linux/sbin/ldconfig: Exec format error
pkg-static: POST-INSTALL script failed
...
===>   linux-skype_oss_wrapper-0.1.1 depends on package: linux-c6-devtools>0 - found
===>   Returning to build of linux-skype_oss_wrapper-0.1.1
===>  Configuring for linux-skype_oss_wrapper-0.1.1
===>  Building for linux-skype_oss_wrapper-0.1.1
--- skype_oss ---
--- libpulse.o ---
--- skype_oss ---
echo "#!/bin/sh" > skype_oss && echo "LD_LIBRARY_PATH=/compat/linux/lib/skype_oss_wrapper:\$LD_LIBRARY_PATH skype" >> skype_oss && chmod +x skype_oss
--- libpulse.o ---
/compat/linux/usr/bin/gcc -O2 -pipe  -fstack-protector -fno-strict-aliasing   -m32 -fPIC -c libpulse.c -o libpulse.o
ELF binary type "0" not known.
/compat/linux/usr/bin/gcc: Exec format error
*** [libpulse.o] Error code 126

make[3]: stopped in /usr/ports/audio/linux-skype_oss_wrapper/work/skype_oss_wrapper-0.1.1
1 error

make[3]: stopped in /usr/ports/audio/linux-skype_oss_wrapper/work/skype_oss_wrapper-0.1.1
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make[2]: stopped in /usr/ports/audio/linux-skype_oss_wrapper
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/net-im/skype4
*** Error code 1

Stop.
make: stopped in /usr/ports/net-im/skype4