Zirias / zfbsd-ports

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

multimedia/makemkv: build conflicts with some GNU toolchain packages #1

Closed lebel closed 4 years ago

lebel commented 4 years ago

I posted this on forums.freebsd.org, and I'm reposting it here... As for the ln -sf issue, I can issue a pull request if you'd like, but anyway, here it is:

I just cloned your repo and I had to add a few f to the ln -s so it wouldn't fail if I had errors the first time around, and I'm still getting the following error:

lebel@sulaco   ³ VEnv  ~/S/zfbsd-ports   master    new/multimedia/makemkv 
↳ doas make 
===>   makemkv-1.14.5 depends on package: nasm>0 - found
===>   makemkv-1.14.5 depends on file: /usr/local/include/expat.h - found
===>   makemkv-1.14.5 depends on package: patchelf>0 - found
===>   makemkv-1.14.5 depends on executable: gmake - found
===>   makemkv-1.14.5 depends on package: linux-c7-expat>0 - found
===>   makemkv-1.14.5 depends on package: linux_base-c7>=7.6.1810_7 - found
===>   makemkv-1.14.5 depends on package: linux-c7-devtools>0 - found
===>   makemkv-1.14.5 depends on package: pkgconf>=1.3.0_1 - found
===>   makemkv-1.14.5 depends on package: perl5>=5.30.r1<5.31 - found
===>  Configuring for makemkv-1.14.5
/bin/mkdir -p /usr/home/lebel/Sources/zfbsd-ports/new/multimedia/makemkv/work/staticlibs/bin
cd /usr/home/lebel/Sources/zfbsd-ports/new/multimedia/makemkv/work/staticlibs/bin;  for t in gcc link ld objdump ar nm strip ranlib g++; do  /bin/ln -sf /compat/linux/bin/$t x86_64-redhat-linux-$t;  done
/bin/mkdir -p /usr/home/lebel/Sources/zfbsd-ports/new/multimedia/makemkv/work/staticlibs/lib
cd /usr/home/lebel/Sources/zfbsd-ports/new/multimedia/makemkv/work/staticlibs/lib;  /bin/ln -sf /compat/linux/lib64/libz.so.1 libz.so;  /bin/ln -sf /compat/linux/lib64/libcrypto.so.10 libcrypto.so;  /bin/ln -sf /compat/linux/lib64/libexpat.so.1 libexpat.so
cd /usr/home/lebel/Sources/zfbsd-ports/new/multimedia/makemkv/work/fdk-aac-2.0.0;  export PATH=/usr/home/lebel/Sources/zfbsd-ports/new/multimedia/makemkv/work/staticlibs/bin:$PATH  LDFLAGS=-L/usr/home/lebel/Sources/zfbsd-ports/new/multimedia/makemkv/work/staticlibs/lib  CXXFLAGS="-O2 -pipe -DFORCE_OPENSSL_NO_EC -I/usr/home/lebel/Sources/zfbsd-ports/new/multimedia/makemkv/work/openssl-1.0.2k/include -fstack-protector-strong -fno-strict-aliasing "  LD=x86_64-redhat-linux-ld; ./configure --prefix=/usr/home/lebel/Sources/zfbsd-ports/new/multimedia/makemkv/work/staticlibs  --disable-shared --enable-static --with-pic  --host=x86_64-redhat-linux --disable-silent-rules;

checking for a BSD-compatible install... /usr/local/bin/ginstall -c
checking whether build environment is sane... yes
checking for x86_64-redhat-linux-strip... x86_64-redhat-linux-strip
checking for a thread-safe mkdir -p... /usr/local/bin/gmkdir -p
checking for gawk... no
checking for mawk... no
checking for nawk... nawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether UID '0' is supported by ustar format... yes
checking whether GID '0' is supported by ustar format... yes
checking how to create a ustar tar archive... gnutar
checking whether make supports nested variables... (cached) yes
checking for x86_64-redhat-linux-gcc... x86_64-redhat-linux-gcc
checking whether the C compiler works... no
configure: error: in `/usr/home/lebel/Sources/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/home/lebel/Sources/zfbsd-ports/new/multimedia/makemkv
1  lebel@sulaco   ³ VEnv  ~/S/zfbsd-ports   master    new/multimedia/makemkv 
↳

My guess is that configure picks up the $LINUXTRIPLETS-gcc as compiler, but will link using BSD's ld.

You might see that I modified a bit your Makefile, so just so we're on the same line, here's the diff of the Makefile:

diff --git a/new/multimedia/makemkv/Makefile b/new/multimedia/makemkv/Makefile
index 10d4d9d..8f40849 100644
--- a/new/multimedia/makemkv/Makefile
+++ b/new/multimedia/makemkv/Makefile
@@ -89,13 +89,13 @@ pre-configure:
                ${MKDIR} ${WRKDIR}/staticlibs/bin
                cd ${WRKDIR}/staticlibs/bin; \
                for t in gcc link ld objdump ar nm strip ranlib g++; do \
-                       ${LN} -s ${LINUXBASE}/bin/$$t ${LINUXTRIPLET}-$$t; \
+                       ${LN} -sf ${LINUXBASE}/bin/$$t ${LINUXTRIPLET}-$$t; \
                done
                ${MKDIR} ${WRKDIR}/staticlibs/lib
                cd ${WRKDIR}/staticlibs/lib; \
-                       ${LN} -s ${LINUXLIBDIR}/libz.so.1 libz.so; \
-                       ${LN} -s ${LINUXLIBDIR}/libcrypto.so.10 libcrypto.so; \
-                       ${LN} -s ${LINUXLIBDIR}/libexpat.so.1 libexpat.so
+                       ${LN} -sf ${LINUXLIBDIR}/libz.so.1 libz.so; \
+                       ${LN} -sf ${LINUXLIBDIR}/libcrypto.so.10 libcrypto.so; \
+                       ${LN} -sf ${LINUXLIBDIR}/libexpat.so.1 libexpat.so
                cd ${WRKDIR}/fdk-aac-${FDKAACVERSION}; \
                PATH=${WRKDIR}/staticlibs/bin:$$PATH \
                LDFLAGS=-L${WRKDIR}/staticlibs/lib \

All that under FreeBSD 12.0-p10.

Zirias commented 4 years ago

As for the -f, not sure this should be done, because a simple make clean will work as well.

As for the actual issue: Did it work earlier? I didn't update to -p10 so far, but it works without issues on -p8 on multiple machines.

Did you check work/fdk-aac-2.0.0/config.log for more details?

lebel commented 4 years ago

It is the first time I tried it seeing I just recently move my server to FreeBSD from Linux (long time sysadmin of both OSs). I'm including the content of config.log, but it fails since it tries to link the output of x86_64-redhat-linux-gcc with FreeBSD's native ld:

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/home/lebel/Sources/zfbsd-ports/new/multimedia/makemkv/work/staticlibs --disable-shared --enable-static --with-pic --host=x86_64-redhat-linux --disable-silent-rules

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

hostname = sulaco.lebel.org
uname -m = amd64
uname -r = 12.0-RELEASE-p10
uname -s = FreeBSD
uname -v = FreeBSD 12.0-RELEASE-p10 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/home/lebel/Sources/zfbsd-ports/new/multimedia/makemkv/work/staticlibs/bin
PATH: /usr/local/sbin
PATH: /usr/local/bin
PATH: /usr/sbin
PATH: /usr/bin
PATH: /sbin
PATH: /bin

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

configure:2321: checking for a BSD-compatible install
configure:2389: result: /usr/local/bin/ginstall -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/home/lebel/Sources/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.3.3 - libarchive 3.3.3 zlib/1.2.11 liblzma/5.2.4 bz2lib/1.0.7 
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/home/lebel/Sources/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
x86_64-redhat-linux-gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-39)
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:3381: $? = 0
configure:3370: x86_64-redhat-linux-gcc -v >&5
Using built-in specs.
COLLECT_GCC=x86_64-redhat-linux-gcc
COLLECT_LTO_WRAPPER=/compat/linux/usr/bin/../libexec/gcc/x86_64-redhat-linux/4.8.5/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/cloog-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.8.5 20150623 (Red Hat 4.8.5-39) (GCC) 
configure:3381: $? = 0
configure:3370: x86_64-redhat-linux-gcc -V >&5
x86_64-redhat-linux-gcc: error: unrecognized command line option '-V'
x86_64-redhat-linux-gcc: fatal error: no input files
compilation terminated.
configure:3381: $? = 4
configure:3370: x86_64-redhat-linux-gcc -qversion >&5
x86_64-redhat-linux-gcc: error: unrecognized command line option '-qversion'
x86_64-redhat-linux-gcc: fatal error: no input files
compilation terminated.
configure:3381: $? = 4
configure:3401: checking whether the C compiler works
configure:3423: x86_64-redhat-linux-gcc   -L/usr/home/lebel/Sources/zfbsd-ports/new/multimedia/makemkv/work/staticlibs/lib conftest.c  >&5
/usr/local/bin/ld: cannot find /lib64/libc.so.6
/usr/local/bin/ld: cannot find /usr/lib64/libc_nonshared.a
/usr/local/bin/ld: cannot find /lib64/ld-linux-x86-64.so.2
collect2: error: ld returned 1 exit status
configure:3427: $? = 1
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/home/lebel/Sources/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/home/lebel/Sources/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/home/lebel/Sources/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/local/bin/ginstall -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/home/lebel/Sources/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/home/lebel/Sources/zfbsd-ports/new/multimedia/makemkv/work/fdk-aac-2.0.0/missing autoconf'
AUTOHEADER='${SHELL} /usr/home/lebel/Sources/zfbsd-ports/new/multimedia/makemkv/work/fdk-aac-2.0.0/missing autoheader'
AUTOMAKE='${SHELL} /usr/home/lebel/Sources/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/home/lebel/Sources/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/home/lebel/Sources/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/home/lebel/Sources/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/home/lebel/Sources/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/home/lebel/Sources/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
Zirias commented 4 years ago
configure:3423: x86_64-redhat-linux-gcc   -L/usr/home/lebel/Sources/zfbsd-ports/new/multimedia/makemkv/work/staticlibs/lib conftest.c  >&5
/usr/local/bin/ld: cannot find /lib64/libc.so.6

These two lines tell me that, like I expected, ld isn't invoked directly, but by the C-compiler (in this case x86_64-redhat-linux-gcc).

I don't have an immediate idea how it comes to choose /usr/local/bin/ld, as x86_64-redhat-linux-ld is put into the path first and it should always check for the correct cross-compiling tool first.

Still, ld is normally in /usr/bin/ld on FreeBSD, it's part of the base system. Could you check what package installed your /usr/local/bin/ld?

lebel commented 4 years ago

I don't have an immediate idea how it comes to choose /usr/local/bin/ld, as x86_64-redhat-linux-ld is put into the path first and it should always check for the correct cross-compiling tool first.

Well, according to pkg which, it is: binutils-2.32_1,1

I'll try to uninstall it and see how it goes.

lebel commented 4 years ago

It indeed allowed the build to go thru. Good catch. I don't know how both gcc8 and gcc9 was installed on my system. Most likely when I installed some packages as a dependency with the build process from manually building packages from /usr/ports.

Anyway, it now fails somewhere in ffmpeg (I'm including only the last command it ran):

x86_64-redhat-linux-gcc -I. -I./ -Dcaddr_t=void\* -D__daddr_t_defined -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -DPIC -I./compat/atomics/gcc -DZLIB_CONST -DHAVE_AV_CONFIG_H -DBUILDING_avdevice -O2 -pipe -DFORCE_OPENSSL_NO_EC -I/usr/home/lebel/Sources/zfbsd-ports/new/multimedia/makemkv/work/openssl-1.0.2k/include -fstack-protector-strong -fno-strict-aliasing    -std=c11 -fomit-frame-pointer -fPIC -pthread  -I/usr/home/lebel/Sources/zfbsd-ports/new/multimedia/makemkv/work/staticlibs/include -g -Wdeclaration-after-statement -Wall -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wwrite-strings -Wtype-limits -Wundef -Wmissing-prototypes -Wno-pointer-to-int-cast -Wstrict-prototypes -Wempty-body -Wno-parentheses -Wno-switch -Wno-format-zero-length -Wno-pointer-sign -Wno-char-subscripts -O3 -fno-math-errno -fno-signed-zeros -fno-tree-vectorize -Werror=format-security -Werror=implicit-function-declaration -Werror=missing-prototypes -Werror=return-type -Werror=vla -Wformat -fdiagnostics-color=auto -Wno-maybe-uninitialized  -MMD -MF libavdevice/v4l2-common.d -MT libavdevice/v4l2-common.o -c -o libavdevice/v4l2-common.o libavdevice/v4l2-common.c
In file included from libavdevice/v4l2-common.h:36:0,
                 from libavdevice/v4l2-common.c:19:
/usr/local/include/linux/videodev2.h:67:18: error: conflicting types for '__u64'
 typedef uint64_t __u64;
                  ^
In file included from /usr/include/asm-generic/types.h:7:0,
                 from /usr/include/asm/types.h:4,
                 from libavdevice/v4l2-common.h:34,
                 from libavdevice/v4l2-common.c:19:
/usr/include/asm-generic/int-ll64.h:30:42: note: previous declaration of '__u64' was here
 __extension__ typedef unsigned long long __u64;
                                          ^
In file included from libavdevice/v4l2-common.h:36:0,
                 from libavdevice/v4l2-common.c:19:
/usr/local/include/linux/videodev2.h:80:17: error: conflicting types for '__s64'
 typedef int64_t __s64;
                 ^
In file included from /usr/include/asm-generic/types.h:7:0,
                 from /usr/include/asm/types.h:4,
                 from libavdevice/v4l2-common.h:34,
                 from libavdevice/v4l2-common.c:19:
/usr/include/asm-generic/int-ll64.h:29:44: note: previous declaration of '__s64' was here
 __extension__ typedef __signed__ long long __s64;
                                            ^
gmake[1]: *** [ffbuild/common.mak:59: libavdevice/v4l2-common.o] Error 1
gmake[1]: Leaving directory '/usr/home/lebel/Sources/zfbsd-ports/new/multimedia/makemkv/work/ffmpeg-4.2.1'
*** Error code 2

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

My guess is it still tries to get includes from the base system instead avoiding them, seeing you're using Red Hat's gcc toolchain.

lebel commented 4 years ago

Well, for that last fail, I had to remove a package installed:

doas pkg remove v4l_compat-1.6.3_3

I don't know how and what made that package install, but it conflicted with the build of ffmpeg.

It finally completed and I installed the package! I'll test it out tonight.

Zirias commented 4 years ago

Well, that's a bummer ... I assume this problem is in principle the same as the initial one: Some parts of a GNU toolchain you have installed via ports/packages is picked up instead of the one from the c6-/c7- linux system I'm linking as a cross toolchain in ${WRKDIR} -- I'd bet you'll have a successful build once you uninstall all packages related to the GNU toolchain (probably just gcc and binutils).

As for include files: As soon as a native FreeBSD binary is used, it will only see the FreeBSD filesystem tree, whereas a Linux binary will see the tree from /compat/linux overlayed, so if there's a header file by the same name in /compat/linux, it will be used instead of the native FreeBSD one by a Linux gcc. The problem here is FreeBSD-native GNU toolchain tools jumping in where they shouldn't.

This will never be a problem when building with poudriere, so I never noticed it. I'll have to reproduce it here locally and find a way to fix it, so this port builds even when you have GNU toolchain stuff installed...

Zirias commented 4 years ago

Reopening because other packages preventing a correct build is an issue, so thanks for reporting and helping to analyze.

lebel commented 4 years ago

And speaking of which, I just "ripped" my first Bluray on FreeBSD and it worked just fine.

Also, speaking of Poudriere, do you use it only for local ports or do you use it to build all of your packages? If the later, how do you combine using it to build packages off the regular ports tree AND local ports that aren't it it ?

Zirias commented 4 years ago

If the later, how do you combine using it to build packages off the regular ports tree AND local ports that aren't it it ?

Simple, I just add them to my tree manually. The tree is a subversion working copy, adding a directory locally doesn't confuse subversion :)

BTW, I just have to identify which ports to put in BUILD_CONFLICTS to actually close this issue :)

lebel commented 4 years ago

My poudriere tree is using portsnap right now. I'll switch to svn then and see how it reacts to having makemkv in it. I could start using portshaker too I read.

I'll update my tree of your repo then.

Envoyé depuis ProtonMail mobile

-------- Message d'origine -------- On 13 oct. 2019 13 h 59, Felix Palmen < notifications@github.com > a écrit : If the later, how do you combine using it to build packages off the regular ports tree AND local ports that aren't it it ? Simple, I just add them to my tree manually. The tree is a subversion working copy, adding a directory locally doesn't confuse subversion :) BTW, I just have to identify which ports to put in BUILD_CONFLICTS to actually close this issue :) — You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub, or unsubscribe. [ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/Zirias/zfbsd-ports/issues/1?email\_source=notifications">https://github.com/Zirias/zfbsd-ports/issues/1?email\_source=notifications\\u0026email\_token=AAF7PRC2TBN2WTFH7VWYP4TQONOY5A5CNFSM4I5PD2HKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBC33EA\#issuecomment-541441424", "url": "https://github.com/Zirias/zfbsd-ports/issues/1?email\_source=notifications">https://github.com/Zirias/zfbsd-ports/issues/1?email\_source=notifications\\u0026email\_token=AAF7PRC2TBN2WTFH7VWYP4TQONOY5A5CNFSM4I5PD2HKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBC33EA\#issuecomment-541441424", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]

Zirias commented 4 years ago

With the latest update to 1.15.0, I was forced to create a temporary cross-toolchain for building, so I assume this bug is fixed by that. If not, please comment.