|
From: | Christian Jullien |
Subject: | [Tinycc-devel] macos: DYLD_LIBRARY_PATH no longer works after cleanup |
Date: | Wed, 8 Jul 2020 16:57:04 +0200 |
The code cleanup now sets DYLD_LIBRARY_PATH this way in Makefile: NATIVE_TARGET = $(ARCH) ifdef CONFIG_OSX NATIVE_TARGET = $(ARCH)-osx ifneq ($(CC_NAME),tcc) LDFLAGS += -flat_namespace -undefined warning endif export MACOSX_DEPLOYMENT_TARGET := 10.6 export DYLD_LIBRARY_PATH := $(CURDIR)/$(TOP) endif It is still unclear why it does not work but on macOS, ./configure –disable-static Now raises an error: ------------ hello-exe ------------ === recurse /Users/jullien/tinycc/tests/.. === dyld: Library not loaded: libtcc.dylib Referenced from: /Users/jullien/tinycc/tests/../tcc Reason: image not found Tracing a little bit with: hello-exe: ../examples/ex1.c @echo ------------ $@ ------------ @echo === recurse $(DYLD_LIBRARY_PATH) === $(TCC) $< -o hello$(EXESUF) && ./hello$(EXESUF) || $(DUMPTCC) Shows that DYLD_LIBRARY_PATH is correctly set: ------------ hello-exe ------------ === recurse /Users/jullien/tinycc/tests/.. === dyld: Library not loaded: libtcc.dylib Referenced from: /Users/jullien/tinycc/tests/../tcc Only this change (similar to what it was before cleanup) makes it run: hello-exe: ../examples/ex1.c @echo ------------ $@ ------------ @echo === recurse $(DYLD_LIBRARY_PATH) === DYLD_LIBRARY_PATH=$(DYLD_LIBRARY_PATH) $(TCC) $< -o hello$(EXESUF) && ./hello$(EXESUF) || $(DUMPTCC) |
[Prev in Thread] | Current Thread | [Next in Thread] |