-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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: migrate to Conan v2, add v4.1.1 #19058
Conversation
valgur
commented
Aug 5, 2023
•
edited
edited
- Requires pcre2: fix invalid pcre2-config output for static libs #20586
- Resolves [request] SWIG/4.1.1 #19498
- Resolves [package] swig>/<4.1.0>: Could NOT find SWIG (missing: SWIG_DIR) #15324
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@jmarrec after applying your fix in the recipe, I get
for 4.1.1. Do you know if this is expected as per #16554 (comment)? |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@RubenRBS Seems like @valgur already fixed it in a4a1c71 (thanks!) |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@uilianries @RubenRBS Can you help with |
This comment has been minimized.
This comment has been minimized.
4c16055
to
f464bf9
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@valgur You can probably directly switch to 4.2.1 - take my patch from the closed PR - only the |
@valgur, your recipe works for me on all my platforms, I just have some horrible output that goes like this: Click to expand
|
@valgur, I upgraded your recipe to 4.2.1 and because of this upstream change
|
I found the problem - there is a |
The other problem - the horrible output - is due to this code: https://github.com/swig/swig/blob/a7eca8b4159840801c911c0d7b2a3325c3cbfa1e/configure.ac#L2859 SWIG supports out of source builds, however |
@valgur I have adapted your recipe for SWIG JSE (which is compatible at the configure level with SWIG 4.2.1): There are 2 configure patches - for SWIG JSE is a very fast moving target and I will be publishing it to my own Artifactory CE - at least until I stop doing weekly releases (which are not really point releases, since I am still adding features) |
# Rely on AutotoolsDeps instead of pcre2-config | ||
# https://github.com/swig/swig/blob/v4.1.1/configure.ac#L70-L92 | ||
# https://github.com/swig/swig/blob/v4.0.2/configure.ac#L65-L86 | ||
replace_in_file(self, os.path.join(self.source_folder, "configure.ac"), | ||
'AS_IF([test "x$with_pcre" != xno],', 'AS_IF([false],') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You MUST define "HAVE_PCRE=1" in that case, or you'll get errors trying to build C# bindings in particular.
PCRE regex matching is not available in this SWIG build
replace_in_file(self, os.path.join(self.source_folder, "configure.ac"), | ||
'AS_IF([test "x$with_pcre" != xno],', 'AS_IF([false],') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
replace_in_file(self, os.path.join(self.source_folder, "configure.ac"), | |
'AS_IF([test "x$with_pcre" != xno],', 'AS_IF([false],') | |
replace_in_file(self, os.path.join(self.source_folder, "configure.ac"), | |
'AS_IF([test "x$with_pcre" != xno],', 'AC_DEFINE([HAVE_PCRE], [1])\nAS_IF([false],') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hum that works on mac, but not on ubuntu/windows.
/usr/bin/ld: Swig/misc.o: in function `Swig_string_regex':
misc.c:(.text+0x263b): undefined reference to `pcre2_compile_8'
/usr/bin/ld: misc.c:(.text+0x2651): undefined reference to `pcre2_match_data_create_from_pattern_8'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh cool, it's also affected by:
cl : Command line warning D9002 : ignoring unknown option '-LIBPATH:D:/a/runner/runner/conan-cache/.conan2/p/pcre2d85e041fe43c5/p/lib'
cl : Command line warning D9002 : ignoring unknown option '-LIBPATH:D:/a/runner/runner/conan-cache/.conan2/p/bzip2e06444d88ab4f/p/lib'
cl : Command line warning D9002 : ignoring unknown option '-LIBPATH:D:/a/runner/runner/conan-cache/.conan2/p/zlib9d72e7d21adc5/p/lib'
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Conan v1 pipeline ✔️All green in build 5 (
Conan v2 pipeline ✔️
All green in build 4 ( |
Thanks, @jmarrec! I applied the changes you suggested. Can you verify that it works as expected now? |