Hi,

> http://build-failures.rhaalovely.net/mips64/2020-04-02/multimedia/mkvtoolnix%2Cno_x11.log
(spoiler: uses ld.lld on macppc as well)

This is what happens, because i had fun with it as usual:

- autoconf searches for lld, and defines LLVM_LLD
- 'configure' only allows overriding of LLVM_LLD with a path, thanks to
  ac_cv_path_LLVM_LLD, and we don't want "hardcoded" paths where we can
  avoid them
- a 'build-config' file is then generated with
  LLVM_LLD="/usr/local/bin/ld.lld" inside
- This file is read by 'Rakefile', that implies that if you're using
  clang, then you're using lld (sigh). So lld is used on clang+ld.bfd
  archs, where it obviously does not work.

As such, i've dropped the conditional in 'Rakefile', so the default (and
working) linker is used. This fixes the build on macppc [0], and amd64
is fine.

Comments/feedback are welcome,

Charlène.


[0] https://bin.charlenew.xyz/macppc/paths/multimedia/mkvtoolnix.log


Index: Makefile
===================================================================
RCS file: /cvs/ports/multimedia/mkvtoolnix/Makefile,v
retrieving revision 1.94
diff -u -p -u -p -r1.94 Makefile
--- Makefile    27 Mar 2020 05:13:58 -0000      1.94
+++ Makefile    18 Apr 2020 13:25:36 -0000
@@ -4,7 +4,7 @@ COMMENT=        create, alter and inspect Matro
 
 # Update depends on a new boost version
 DISTNAME=      mkvtoolnix-33.0.0
-REVISION=      1
+REVISION=      2
 
 CATEGORIES=    multimedia x11
 
Index: patches/patch-Rakefile
===================================================================
RCS file: patches/patch-Rakefile
diff -N patches/patch-Rakefile
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-Rakefile      18 Apr 2020 13:25:36 -0000
@@ -0,0 +1,16 @@
+$OpenBSD$
+
+`configure' defines LLVM_LLD, that can only be overridden with another path.
+Ensure that the default and working linker is used on all clang archs.
+
+Index: Rakefile
+--- Rakefile.orig
++++ Rakefile
+@@ -156,7 +156,6 @@ def setup_globals
+   cxxflags                += " #{c(:QT_CFLAGS)} #{c(:BOOST_CPPFLAGS)} 
#{c(:USER_CXXFLAGS)}"
+ 
+   ldflags                  = ""
+-  ldflags                 += " -fuse-ld=lld"                            if 
is_clang? && !c(:LLVM_LLD).empty?
+   ldflags                 += " -Llib/libebml/src -Llib/libmatroska/src" if 
c?(:EBML_MATROSKA_INTERNAL)
+   ldflags                 += " -Llib/fmt/src"                           if 
c?(:FMT_INTERNAL)
+   ldflags                 += " #{c(:EXTRA_LDFLAGS)} #{c(:PROFILING_LIBS)} 
#{c(:USER_LDFLAGS)} #{c(:LDFLAGS_RPATHS)} #{c(:BOOST_LDFLAGS)}"

Reply via email to