pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/54352: archives/dar try to build static binary on macosx and might fail to build



>Number:         54352
>Category:       pkg
>Synopsis:       archives/dar try to build static binary on macosx and might fail to build
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jul 06 12:20:00 +0000 2019
>Originator:     clément bouvier
>Release:        current
>Organization:
>Environment:
Darwin kernel version 17.7.0 High Sierra 10.13.6
>Description:
archives/dar does not build on the Joyent configuration build.

http://us-east.manta.joyent.com/pkgsrc/public/reports/Darwin/trunk/x86_64/20190701.2126/dar-2.4.13nb1/build.log

The problem happens in the testing part of the project where some static binaries want to be built.
The problem is that is not supported under macosx and also clang cannot link without any undefined symbols.
>How-To-Repeat:
setup a Joyent equivalent build infra (https://github.com/joyent/pkgsrc/wiki/pkgdev:setup) and
try to build archives/dar.
>Fix:
Change the libtool option -all-static into -static on macosx unbreak the build.

The package build on a unprivileged pkgsrc bootstrap but generates libtoob warning "complete static linking is impossible in this configuration".
 The patch removes the warnings in this setup.

Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/archivers/dar/Makefile,v
retrieving revision 1.54
diff -u -r1.54 Makefile
--- Makefile	4 Jul 2018 13:40:07 -0000	1.54
+++ Makefile	6 Jul 2019 11:58:04 -0000
@@ -93,8 +93,9 @@
 
 .include "../../mk/bsd.fast.prefs.mk"
 
-## Build a static binary with threads is currently broken with glibc.
-.if ${OPSYS} == "Linux" && !empty(PKG_OPTIONS:Mthreads)
+## Build a static binary with threads is currently broken with glibc on Linux
+## Build a static binary is not supported on macosx
+.if (${OPSYS} == "Linux" && !empty(PKG_OPTIONS:Mthreads)) || ${OPSYS} == "Darwin"
 SUBST_CLASSES+=		static
 SUBST_STAGE.static=	pre-configure
 SUBST_MESSAGE.static=	Changing -all-static to -static




Home | Main Index | Thread Index | Old Index