I am trying to install a project that was developed on Ubuntu, but now I am trying to run it on Max OSX - version: 10.10.5 (Yosemite).
My current version of ld, which comes with OSX by default:
ld -v @(
Makefile file content:
PYLIB = -I/usr/include/python2.7 CLIBS = CC = gcc CFLAGS = $(PYLIB) $(CLIBS) -fPIC -O3 -std=c++11 LD = g++ LDFLAGS = -shared -L. -Wl,--no-as-needed $(CLIBS) SWIG = swig SWIGFLAGS = -c++ -python -extranative MODULE = iPlaneImporter CMODULE = $(MODULE).cpp CMODULE_H = $(MODULE).h CMODULE_OBJ = $(MODULE).o INTERFACE = $(MODULE).i CWRAPPER = $(MODULE)_wrap.cpp CWRAPPER_OBJ = $(MODULE)_wrap.o PYMODULE = $(MODULE).py SOLIB = _$(MODULE).so SRCS = $(CMODULE) $(CWRAPPER) OBJS = $(CMODULE_OBJ) $(CWRAPPER_OBJ) all: $(SOLIB) $(PYMODULE) .PHONY: clean clean: rm -f $(CWRAPPER) $(PYMODULE) $(OBJS) $(SOLIB) *.pyc $(CWRAPPER) $(PYMODULE): $(INTERFACE) $(CMODULE_H) $(SWIG) $(SWIGFLAGS) -o $(CWRAPPER) $(INTERFACE) $(OBJS): $(SRCS) $(CC) -c $(SRCS) $(CFLAGS) $(SOLIB): $(OBJS) $(LD) $(LDFLAGS) $(OBJS) -o $(SOLIB)
Error:
ld: unknown option: --no-as-needed collect2: error: ld returned 1 exit status make[1]: *** [_iPlaneImporter.so] Error 1
I believe the problem is here
LDFLAGS = -shared -L. -Wl, - no $ (CLIBS) required
The OSX component does not support this option, and I checked the manual page to find out what possible replacements I could use instead of --no-as-needed, but could not find.
Removing this option also does not help - it causes other errors.
I tried installing the GNU command line tools on OSX from an online resource here . But I believe that the GNU linker is not included in this.
In addition, I also installed gcc47, also does not help.
Can someone suggest some workarounds for this option and confirm that the GNU linker cannot be installed on OSX?
Thanks!
source share