Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make install on macOS reports error "symbols referenced by indirect symbol table entries that can't be stripped" #541

Closed
brunorijsman opened this issue Aug 13, 2024 · 4 comments

Comments

@brunorijsman
Copy link

brunorijsman commented Aug 13, 2024

Make install on macOS reports error "symbols referenced by indirect symbol table entries that can't be stripped"

Clixon version:
Branch: master
Commit hash: 9da4939
Clone date: 13-Aug-2024

MacOS version: Ventura 13.3.1

Reproduce steps:

git clone https://github.com/clicon/clixon.git
cd clixon
./configure
make
sudo make install

Note: you need the work-around described in issue 540 for the make step to work.

Error message in the make install step:

install -m 0644 -s libclixon_restconf.so.7.1 /usr/local/lib
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip: error: symbols referenced by indirect symbol table entries that can't be stripped in: /usr/local/lib/libclixon_restconf.so.7.1
___assert_rtn
___error
___maskrune
___stack_chk_fail
___toupper
_api_path2xpath
_api_return_err
[... many more symbols ...]
_ys_spec
__DefaultRuneLocale
___stack_chk_guard
dyld_stub_binder
install: child process failed: xcrun strip - /usr/local/lib/libclixon_restconf.so.7.1
make[2]: *** [install-lib] Error 70
make[1]: *** [install] Error 1
make: *** [install] Error 1

Version of xrun:

$ xcrun --version
xcrun version 59.

Workaround:

INSTALLFLAGS="" ./configure
make
sudo make install
@brunorijsman
Copy link
Author

Closing as evidently macos is no longer supported (see comment on issue #540)

@brunorijsman brunorijsman closed this as not planned Won't fix, can't repro, duplicate, stale Aug 19, 2024
@krihal
Copy link
Collaborator

krihal commented Aug 19, 2024

diff --git a/apps/restconf/Makefile.in b/apps/restconf/Makefile.in
index 728ca18bb..2ca267ab8 100644
--- a/apps/restconf/Makefile.in
+++ b/apps/restconf/Makefile.in
@@ -41,13 +41,6 @@ top_srcdir   = @top_srcdir@
 CC             = @CC@
 CFLAGS         = @CFLAGS@
 LINKAGE         = @LINKAGE@
-
-ifeq ($(HOST_VENDOR),apple)
-INSTALLFLAGS =
-else
-INSTALLFLAGS = @INSTALLFLAGS@
-endif
-
 LDFLAGS        = @LDFLAGS@

 prefix                 = @prefix@
@@ -71,6 +64,13 @@ LIBSTATIC_SUFFIX = @LIBSTATIC_SUFFIX@
 CLIXON_MAJOR    = @CLIXON_VERSION_MAJOR@
 CLIXON_MINOR    = @CLIXON_VERSION_MINOR@

+# Don't strip if running MacOS
+ifeq ($(HOST_VENDOR),apple)
+       INSTALLFLAGS =
+else
+       INSTALLFLAGS = -s
+endif
+
 # Use this clixon lib for linking
 ifeq ($(LINKAGE),dynamic)
        CLIXON_LIB      = libclixon$(SH_SUFFIX).$(CLIXON_MAJOR).$(CLIXON_MINOR)

@olofhagsand
Copy link
Member

@brunorijsman please verify and close if fixed

@brunorijsman
Copy link
Author

Verified; fix works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants