Zirias / zfbsd-ports

Zirias' FreeBSD ports tree
Other
5 stars 1 forks source link

Build error "eval: x86_64-redhat-linux-gcc: Exec format error" for fdk-aac-2.0.0 #3

Closed botsmack closed 4 years ago

botsmack commented 4 years ago

I'm running FreeBSD 12.1-RELEASE-p1. During the make install process, it fails with:

checking for x86_64-redhat-linux-gcc... x86_64-redhat-linux-gcc
ELF binary type "0" not known.
ELF binary type "0" not known.
ELF binary type "0" not known.
ELF binary type "0" not known.
checking whether the C compiler works... ELF binary type "0" not known.
no
configure: error: in `/usr/zfbsd-ports/new/multimedia/makemkv/work/fdk-aac-2.0.0':
configure: error: C compiler cannot create executables
See `config.log' for more details
*** Error code 77

Stop.
make: stopped in /usr/zfbsd-ports/new/multimedia/makemkv

Here is the work/fdk-aac-2.0.0/config.log:

This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by fdk-aac configure 2.0.0, which was
generated by GNU Autoconf 2.69.  Invocation command line was

  $ ./configure --prefix=/usr/zfbsd-ports/new/multimedia/makemkv/work/staticlibs --disable-shared --enable-static --with-pic --host=x86_64-redhat-linux --disable-silent-rules

## --------- ##
## Platform. ##
## --------- ##

hostname = daedalus
uname -m = amd64
uname -r = 12.1-RELEASE-p1
uname -s = FreeBSD
uname -v = FreeBSD 12.1-RELEASE-p1 GENERIC 

/usr/bin/uname -p = amd64
/bin/uname -X     = unknown

/bin/arch              = unknown
/usr/bin/arch -k       = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo      = unknown
/bin/machine           = unknown
/usr/bin/oslevel       = unknown
/bin/universe          = unknown

PATH: /usr/zfbsd-ports/new/multimedia/makemkv/work/staticlibs/bin
PATH: /sbin
PATH: /bin
PATH: /usr/sbin
PATH: /usr/bin
PATH: /usr/local/sbin
PATH: /usr/local/bin
PATH: /root/bin

## ----------- ##
## Core tests. ##
## ----------- ##

configure:2321: checking for a BSD-compatible install
configure:2389: result: /usr/bin/install -c
configure:2400: checking whether build environment is sane
configure:2455: result: yes
configure:2514: checking for x86_64-redhat-linux-strip
configure:2530: found /usr/zfbsd-ports/new/multimedia/makemkv/work/staticlibs/bin/x86_64-redhat-linux-strip
configure:2541: result: x86_64-redhat-linux-strip
configure:2606: checking for a thread-safe mkdir -p
configure:2645: result: /usr/local/bin/gmkdir -p
configure:2652: checking for gawk
configure:2682: result: no
configure:2652: checking for mawk
configure:2682: result: no
configure:2652: checking for nawk
configure:2668: found /usr/bin/nawk
configure:2679: result: nawk
configure:2690: checking whether make sets $(MAKE)
configure:2712: result: yes
configure:2741: checking whether make supports nested variables
configure:2758: result: yes
configure:2847: checking whether UID '0' is supported by ustar format
configure:2850: result: yes
configure:2857: checking whether GID '0' is supported by ustar format
configure:2860: result: yes
configure:2868: checking how to create a ustar tar archive
configure:2879: tar --version
bsdtar 3.4.0 - libarchive 3.4.0 zlib/1.2.11 liblzma/5.2.4 bz2lib/1.0.8 
configure:2882: $? = 0
configure:2922: tardir=conftest.dir && eval tar --format=ustar -chf - "$tardir" >conftest.tar
configure:2925: $? = 0
configure:2929: tar -xf - <conftest.tar
configure:2932: $? = 0
configure:2934: cat conftest.dir/file
GrepMe
configure:2937: $? = 0
configure:2950: result: gnutar
configure:3011: checking whether make supports nested variables
configure:3028: result: yes
configure:3065: checking for x86_64-redhat-linux-gcc
configure:3081: found /usr/zfbsd-ports/new/multimedia/makemkv/work/staticlibs/bin/x86_64-redhat-linux-gcc
configure:3092: result: x86_64-redhat-linux-gcc
configure:3361: checking for C compiler version
configure:3370: x86_64-redhat-linux-gcc --version >&5
eval: x86_64-redhat-linux-gcc: Exec format error
configure:3381: $? = 126
configure:3370: x86_64-redhat-linux-gcc -v >&5
eval: x86_64-redhat-linux-gcc: Exec format error
configure:3381: $? = 126
configure:3370: x86_64-redhat-linux-gcc -V >&5
eval: x86_64-redhat-linux-gcc: Exec format error
configure:3381: $? = 126
configure:3370: x86_64-redhat-linux-gcc -qversion >&5
eval: x86_64-redhat-linux-gcc: Exec format error
configure:3381: $? = 126
configure:3401: checking whether the C compiler works
configure:3423: x86_64-redhat-linux-gcc   -L/usr/zfbsd-ports/new/multimedia/makemkv/work/staticlibs/lib conftest.c  >&5
eval: x86_64-redhat-linux-gcc: Exec format error
configure:3427: $? = 126
configure:3465: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "fdk-aac"
| #define PACKAGE_TARNAME "fdk-aac"
| #define PACKAGE_VERSION "2.0.0"
| #define PACKAGE_STRING "fdk-aac 2.0.0"
| #define PACKAGE_BUGREPORT "http://sourceforge.net/projects/opencore-amr/"
| #define PACKAGE_URL ""
| #define PACKAGE "fdk-aac"
| #define VERSION "2.0.0"
| /* end confdefs.h.  */
| 
| int
| main ()
| {
| 
|   ;
|   return 0;
| }
configure:3470: error: in `/usr/zfbsd-ports/new/multimedia/makemkv/work/fdk-aac-2.0.0':
configure:3473: error: C compiler cannot create executables
See `config.log' for more details

## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_env_CCC_set=''
ac_cv_env_CCC_value=''
ac_cv_env_CC_set=''
ac_cv_env_CC_value=''
ac_cv_env_CFLAGS_set=''
ac_cv_env_CFLAGS_value=''
ac_cv_env_CPPFLAGS_set=''
ac_cv_env_CPPFLAGS_value=''
ac_cv_env_CPP_set=''
ac_cv_env_CPP_value=''
ac_cv_env_CXXCPP_set=''
ac_cv_env_CXXCPP_value=''
ac_cv_env_CXXFLAGS_set=set
ac_cv_env_CXXFLAGS_value='-O2 -pipe -DFORCE_OPENSSL_NO_EC -I/usr/zfbsd-ports/new/multimedia/makemkv/work/openssl-1.0.2k/include -fstack-protector-strong -fno-strict-aliasing '
ac_cv_env_CXX_set=''
ac_cv_env_CXX_value=''
ac_cv_env_LDFLAGS_set=set
ac_cv_env_LDFLAGS_value=-L/usr/zfbsd-ports/new/multimedia/makemkv/work/staticlibs/lib
ac_cv_env_LIBS_set=''
ac_cv_env_LIBS_value=''
ac_cv_env_LT_SYS_LIBRARY_PATH_set=''
ac_cv_env_LT_SYS_LIBRARY_PATH_value=''
ac_cv_env_build_alias_set=''
ac_cv_env_build_alias_value=''
ac_cv_env_host_alias_set=set
ac_cv_env_host_alias_value=x86_64-redhat-linux
ac_cv_env_target_alias_set=''
ac_cv_env_target_alias_value=''
ac_cv_path_install='/usr/bin/install -c'
ac_cv_path_mkdir=/usr/local/bin/gmkdir
ac_cv_prog_AWK=nawk
ac_cv_prog_CC=x86_64-redhat-linux-gcc
ac_cv_prog_STRIP=x86_64-redhat-linux-strip
ac_cv_prog_make_make_set=yes
am_cv_make_support_nested_variables=yes
am_cv_prog_tar_ustar=gnutar

## ----------------- ##
## Output variables. ##
## ----------------- ##

ACLOCAL='${SHELL} /usr/zfbsd-ports/new/multimedia/makemkv/work/fdk-aac-2.0.0/missing aclocal-1.15'
AMDEPBACKSLASH=''
AMDEP_FALSE=''
AMDEP_TRUE=''
AMTAR='$${TAR-tar}'
AM_BACKSLASH='\'
AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
AM_DEFAULT_VERBOSITY='1'
AM_V='$(V)'
AR=''
AUTOCONF='${SHELL} /usr/zfbsd-ports/new/multimedia/makemkv/work/fdk-aac-2.0.0/missing autoconf'
AUTOHEADER='${SHELL} /usr/zfbsd-ports/new/multimedia/makemkv/work/fdk-aac-2.0.0/missing autoheader'
AUTOMAKE='${SHELL} /usr/zfbsd-ports/new/multimedia/makemkv/work/fdk-aac-2.0.0/missing automake-1.15'
AWK='nawk'
CC='x86_64-redhat-linux-gcc'
CCDEPMODE=''
CFLAGS=''
CPP=''
CPPFLAGS=''
CXX=''
CXXCPP=''
CXXDEPMODE=''
CXXFLAGS='-O2 -pipe -DFORCE_OPENSSL_NO_EC -I/usr/zfbsd-ports/new/multimedia/makemkv/work/openssl-1.0.2k/include -fstack-protector-strong -fno-strict-aliasing '
CYGPATH_W='echo'
DEFS=''
DEPDIR=''
DLLTOOL=''
DSYMUTIL=''
DUMPBIN=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
EXAMPLE_FALSE=''
EXAMPLE_TRUE='#'
EXEEXT=''
FDK_AAC_VERSION=''
FGREP=''
GREP=''
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
INSTALL_STRIP_PROGRAM='$(install_sh) -c -s'
LD=''
LDFLAGS='-L/usr/zfbsd-ports/new/multimedia/makemkv/work/staticlibs/lib'
LIBOBJS=''
LIBS=''
LIBS_PRIVATE=''
LIBS_PUBLIC=''
LIBTOOL=''
LIPO=''
LN_S=''
LTLIBOBJS=''
LT_SYS_LIBRARY_PATH=''
MAKEINFO='${SHELL} /usr/zfbsd-ports/new/multimedia/makemkv/work/fdk-aac-2.0.0/missing makeinfo'
MANIFEST_TOOL=''
MKDIR_P='/usr/local/bin/gmkdir -p'
NM=''
NMEDIT=''
OBJDUMP=''
OBJEXT=''
OTOOL64=''
OTOOL=''
PACKAGE='fdk-aac'
PACKAGE_BUGREPORT='http://sourceforge.net/projects/opencore-amr/'
PACKAGE_NAME='fdk-aac'
PACKAGE_STRING='fdk-aac 2.0.0'
PACKAGE_TARNAME='fdk-aac'
PACKAGE_URL=''
PACKAGE_VERSION='2.0.0'
PATH_SEPARATOR=':'
RANLIB=''
SED=''
SET_MAKE=''
SHELL='/bin/sh'
STRIP='x86_64-redhat-linux-strip'
VERSION='2.0.0'
ac_ct_AR=''
ac_ct_CC=''
ac_ct_CXX=''
ac_ct_DUMPBIN=''
am__EXEEXT_FALSE=''
am__EXEEXT_TRUE=''
am__fastdepCC_FALSE=''
am__fastdepCC_TRUE=''
am__fastdepCXX_FALSE=''
am__fastdepCXX_TRUE=''
am__include=''
am__isrc=''
am__leading_dot='.'
am__nodep=''
am__quote=''
am__tar='tar --format=ustar -chf - "$$tardir"'
am__untar='tar -xf -'
bindir='${exec_prefix}/bin'
build=''
build_alias=''
build_cpu=''
build_os=''
build_vendor=''
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
dvidir='${docdir}'
exec_prefix='NONE'
host='x86_64-redhat-linux'
host_alias='x86_64-redhat-linux'
host_cpu=''
host_os=''
host_vendor=''
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
install_sh='${SHELL} /usr/zfbsd-ports/new/multimedia/makemkv/work/fdk-aac-2.0.0/install-sh'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
mkdir_p='$(MKDIR_P)'
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='/usr/zfbsd-ports/new/multimedia/makemkv/work/staticlibs'
program_transform_name='s,x,x,'
psdir='${docdir}'
runstatedir='${localstatedir}/run'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''

## ----------- ##
## confdefs.h. ##
## ----------- ##

/* confdefs.h */
#define PACKAGE_NAME "fdk-aac"
#define PACKAGE_TARNAME "fdk-aac"
#define PACKAGE_VERSION "2.0.0"
#define PACKAGE_STRING "fdk-aac 2.0.0"
#define PACKAGE_BUGREPORT "http://sourceforge.net/projects/opencore-amr/"
#define PACKAGE_URL ""
#define PACKAGE "fdk-aac"
#define VERSION "2.0.0"

configure: exit 77

Any thoughts? Thank you!

Zirias commented 4 years ago

Do you have the linux and linux64 kernel modules loaded? The build can't work without them as it uses the Linux GCC from the linux-c7 packages.

Anyways, the current port is outdated, makemkvcon will probably refuse to run because it's to old. You just reminded me to update it to 1.15.0, I'm running a test build right now and will check in if successful

Zirias commented 4 years ago

Bad news: As of now, the port is broken. makemkvcon 1.15.0 seems to be built using GCC 5.1 or newer and requires a libstdc++ with CXXABI_1.3.9 -- Centos 7 (used by FreeBSDs Linux ports) is based on GCC 4.8. As the makemkvcon binary is closed-source, there's nothing I can do about that problem short of having the port compile a newer GCC and put the resulting libstdc++ into the package. I'll probably try this in the next days.

botsmack commented 4 years ago

That's cool. Thanks for checking on it. That was going to be my next attempt after I got it to build successfully. I think you're right and my issue is that I didn't have the kernel modules loaded.

Zirias commented 4 years ago

Ok, the port is now fixed, but it's really a horrible solution and will take ages to build: I have to compile a whole temporary toolchain of binutils/glibc/gcc just to create a libstdc++ that works for makemkvcon. As I'm no longer using the Linux compiler, the build should now work without Linux kernel modules, but you will need them anyways at runtime (and also the sg driver, which unfortunately isn't in GENERIC kernel configuration, see the message in upate-makemkv-drives).

botsmack commented 4 years ago

Thanks! I'll check it out. And you were correct about my original error being related to not loading the Linux modules. Once I did that, it compiled. Then that's when I ran into the new message that you just talked about -- the need for the sg driver. I have not had a chance to modify the kernel.

Zirias commented 4 years ago

Ok so I assume this issue is solved. If there are problems building/using the new 1.15.0, please open a new one, thanks.