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

pure-octave: clang: error: invalid argument '-bundle' not allowed with '-dynamiclib' #39

Open
ryandesign opened this issue Jan 21, 2023 · 0 comments

Comments

@ryandesign
Copy link

pure-octave 0.13 is failing to build in MacPorts at the moment, at least with octave 7.3.0 and pure 0.68 on macOS 12.3.1 and macOS 13.0.1, both on x86_64; here is a log from the latter:

https://build.macports.org/builders/ports-13_x86_64-builder/builds/18585/steps/install-port/logs/stdio

rm -f embed.o
mkoctfile -v -DOCTAVE_MAJOR=7 -DOCTAVE_MINOR=3 -o embed.o -c embed.cc
/usr/bin/clang++ -std=gnu++11 -c -I/opt/local/include -fPIC -I/opt/local/include/octave-7.3.0/octave/.. -I/opt/local/include/octave-7.3.0/octave -I/opt/local/include  -pthread -Os -stdlib=libc++ -arch x86_64    -DOCTAVE_MAJOR=7 -DOCTAVE_MINOR=3 embed.cc -o embed.o
mkoctfile: warning: LFLAGS is deprecated and will be removed in a future version of Octave, use LDFLAGS instead
mkoctfile: unknown variable 'RLD_FLAG'
rm -f octave_embed.dylib
/usr/bin/clang++ -std=gnu++11 -dynamiclib -install_name "/opt/local/lib/pure/octave_embed.dylib" -o octave_embed.dylib embed.o -L/opt/local/lib/octave/7.3.0 -L/opt/local/lib -bundle -undefined dynamic_lookup -bind_at_load -bundle_loader /opt/local/bin/octave-7.3.0 -loctinterp -loctave  -L/opt/local/lib/octave/7.3.0 -L/opt/local/lib -bundle -undefined dynamic_lookup -bind_at_load -bundle_loader /opt/local/bin/octave-7.3.0 -lpure 
clang: error: invalid argument '-bundle' not allowed with '-dynamiclib'
make: *** [octave_embed.dylib] Error 1

Indeed, you only want to use one of -bundle—which the comments in the pure-octave Makefile say you do not want:

# OS X quirk: mkoctfile wants to create a bundle, but we want just a
# dylib which can be linked into other modules.

—or -dynamiclib. The flags are coming from mkoctfile commands that the pure-octave Makefile is running:

  • -bundle is coming from:
% mkoctfile -p LFLAGS
mkoctfile: warning: LFLAGS is deprecated and will be removed in a future version of Octave, use LDFLAGS instead
-L/opt/local/lib/octave/7.3.0 -L/opt/local/lib -bundle -undefined dynamic_lookup -bind_at_load -bundle_loader /opt/local/bin/octave-7.3.0
  • -dynamiclib is coming from:
% pkg-config pure --variable shared   
-dynamiclib
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant