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

swig/4.0.2: Replace get_exe_path by something that works on both Ubuntu and macOS #8675

Merged
merged 2 commits into from
Jan 15, 2022

Conversation

jmarrec
Copy link
Contributor

@jmarrec jmarrec commented Jan 7, 2022


  • I've read the guidelines for contributing.
  • I've followed the PEP8 style guides for Python code in the recipes.
  • I've used the latest Conan client version.
  • I've tried at least one configuration locally with the
    conan-center hook activated.

@jmarrec
Copy link
Contributor Author

jmarrec commented Jan 7, 2022

Locally on mac I built it. Then I move it somewhere else, now the swiglib is correctly set (before it would still point to the original package dir)

cd conan-center-index/recipes/swig/all
conan create . swig/4.0.2@ -b missing

[...]
Configuration:
[settings]
arch=armv8
arch_build=armv8
build_type=Release
compiler=apple-clang
compiler.libcxx=libc++
compiler.version=13.0
os=Macos
os_build=Macos
[options]
[build_requires]
[env]
[...]


cd ~/Downloads && mkdir -p Temp && cd Temp
cp -R /Users/julien/.conan/data/swig/4.0.2/_/_/package/f230c9ff93e75f7f31a9ddd287cf970e1e2303b0/ .
./bin/swig -swiglib
=> /Users/julien/Downloads/temp/bin/swig/swiglib

@conan-center-bot

This comment has been minimized.

@SSE4
Copy link
Contributor

SSE4 commented Jan 12, 2022

@jmarrec you have to link with dl, as you're clearly using dl functions (https://github.com/conan-io/conan-center-index/pull/8675/files#diff-2faad25d134ffa5e56b13352ef9e70f031c5603072e8b3780b457f196480f03fR14):

/home/conan/w/BuildSingleReference/.conan/data/swig/4.0.2/_/_/build/bd05f26165563c7f532e2f7411fda47374e19f99/Source/../source_subfolder/Source/Modules/main.cxx:889: undefined reference to `dladdr'
collect2: error: ld returned 1 exit status

@jmarrec
Copy link
Contributor Author

jmarrec commented Jan 12, 2022

@SSE4 You commented pretty much at the same time as I pushed a commit to link to DL. I used the LIBS env variable that is read by swig's configure script, I hope that's ok.

Comment on lines +89 to +90
if self.settings.compiler == 'gcc':
args.append("LIBS=-ldl")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need libdl

@conan-center-bot
Copy link
Collaborator

All green in build 2 (52247b9f6c00b7475daef72388ceea9e55e97a1e):

  • swig/4.0.1@:
    All packages built successfully! (All logs)

  • swig/4.0.2@:
    All packages built successfully! (All logs)

@conan-center-bot conan-center-bot merged commit 1fc6c02 into conan-io:master Jan 15, 2022
@jmarrec jmarrec deleted the 8674_swig_swiglib branch March 14, 2023 09:29
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

Successfully merging this pull request may close these issues.

[package] swig/4.0.2: SWIG_DIR (swiglib) is wrong on mac and points to the build machine
5 participants