Conversation
…as 1.x and 3.x, 3.x does not work) ruby/openssl#369
conancenter still isn't picked up What the hell? Debug why it's not creating SWIGRubyRuntime.hxx Missing dependency chain in windows Re-enable other platforms
``` linking miniruby.exe parse.obj : error LNK2019: unresolved external symbol YYUSE referenced in function rb_yytnamerr [C:\Users\julien\.conan \data\openstudio_ruby\2.7.2\nrel\testing\build\45b3b9a1aa73fdb3ff32afdc2b2ddc0affca7928\Ruby.vcxproj] miniruby.exe : fatal error LNK1120: 1 unresolved externals [C:\Users\julien\.conan\data\openstudio_ruby\2.7.2\nrel\test ing\build\45b3b9a1aa73fdb3ff32afdc2b2ddc0affca7928\Ruby.vcxproj] NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bi n\HostX64\x64\cl.EXE"' : return code '0x2' [C:\Users\julien\.conan\data\openstudio_ruby\2.7.2\nrel\testing\build\45b3b9 a1aa73fdb3ff32afdc2b2ddc0affca7928\Ruby.vcxproj] ```
This reverts commit bfafa6e.
This is an admission of my failure to get Conan Package Tools to pass CONAN_BASE_BUILD_PROFILE to docker context
On conanio/gcc7, pthread_atfork is in pthread, while on ubuntu 20.04 it's in libc. I also tried to patch ruby (cf a7e0297) to reorder lcrypt and lpthread (so that lpthread is at the end) but that didn't work either
debugged the situation in docker conanio/gcc7
|
Holy crap, the linking command is so superbly wrong... I'm always amazed by the fact that ruby build system actually works in some cases... Here are the link flags that work with conanio/gcc7: Removing duplicates, moving |
| && ${PATCH_EXE} -p1 < ${CMAKE_SOURCE_DIR}/patches/Ruby.util.patch | ||
| && ${PATCH_EXE} -p1 < ${CMAKE_SOURCE_DIR}/patches/0002-patch-encoding-CP720.patch | ||
| && ${PATCH_EXE} -p1 < ${CMAKE_SOURCE_DIR}/patches/0003-YYUSE.patch ${EXTRA_PATCH} | ||
| && ${PATCH_EXE} -p1 < ${CMAKE_SOURCE_DIR}/patches/0004-GCC7_8_fix_link_flags.patch |
There was a problem hiding this comment.
New patch for GCC 7 and 8.... it sucks to have to do yet another weird config trick, but that's the way it is
CMakeLists.txt
Outdated
| #file(DOWNLOAD https://iweb.dl.sourceforge.net/project/gnuwin32/bison/2.4.1/bison-2.4.1-dep.zip ${CMAKE_BINARY_DIR}/tools/bison-2.4.1-dep.zip) | ||
| if(NOT EXISTS ${CMAKE_BINARY_DIR}/tools/sed-4.2.1-dep.zip) | ||
| file(DOWNLOAD https://iweb.dl.sourceforge.net/project/gnuwin32/sed/4.2.1/sed-4.2.1-dep.zip ${CMAKE_BINARY_DIR}/tools/sed-4.2.1-dep.zip) | ||
| file(DOWNLOAD https://sourceforge.net/projects/gnuwin32/files/sed/4.2.1/sed-4.2.1-dep.zip ${CMAKE_BINARY_DIR}/tools/sed-4.2.1-dep.zip) |
There was a problem hiding this comment.
sourceforge endpoint changed
conanfile.py
Outdated
| self.requires("openssl/1.1.0l") # fails with 1.1.1h https://github.com/openssl/openssl/issues/3884` | ||
| # Doesn't work with 3.x. | ||
| # Doesn't work on gcc 7 and 8 with 1.1.1n | ||
| self.requires("openssl/1.1.1n") |
| RUBY_FUNC_EXPORTED size_t | ||
| rb_yytnamerr(struct parser_params *p, char *yyres, const char *yystr) | ||
| { | ||
| - YYUSE(p); |
There was a problem hiding this comment.
Patch to Remove YYUSE (which is now private in bison 3.7.5+)
cf ruby/ruby@b091889#diff-60e6f0aa6e190c54f6cb0ac74148ced3cf0ef8703e1c3824a07a82dc54654953R13335
| && ${PATCH_EXE} -p1 < ${CMAKE_SOURCE_DIR}/patches/Ruby.patch | ||
| && ${PATCH_EXE} -p1 < ${CMAKE_SOURCE_DIR}/patches/Ruby.util.patch | ||
| && ${PATCH_EXE} -p1 < ${CMAKE_SOURCE_DIR}/patches/0002-patch-encoding-CP720.patch | ||
| && ${PATCH_EXE} -p1 < ${CMAKE_SOURCE_DIR}/patches/0003-YYUSE.patch ${EXTRA_PATCH} |
There was a problem hiding this comment.
new patch for all...
| && ${PATCH_EXE} -p1 < ${CMAKE_SOURCE_DIR}/patches/Ruby.win.272.patch # && ${PATCH_EXE} -p1 < ${CMAKE_SOURCE_DIR}/patches/Ruby.nodynamic.patch | ||
| && ${PATCH_EXE} -p1 < ${CMAKE_SOURCE_DIR}/patches/0001-patch-to-support-version-ranges-for-MSVC.patch | ||
| && ${PATCH_EXE} -p1 < ${CMAKE_SOURCE_DIR}/patches/0002-patch-encoding-CP720.patch | ||
| && ${PATCH_EXE} -p1 < ${CMAKE_SOURCE_DIR}/patches/0003-YYUSE.patch |
| + $(ECHO) NEW LINK FLAGS = -Wl,-rpath,$(libdir) -lruby-static -lz -lrt -lgmp -ldl -lcrypt -lm -lanl -lssl -lcrypto -lreadline -lncurses -lgdbm_compat -lgdbm -lffi -lutil -lyaml -pthread | ||
| + $(Q) $(PURIFY) $(CC) $(LDFLAGS) $(XLDFLAGS) $(MAINOBJ) $(EXTOBJS) -Wl,-rpath,$(libdir) -lruby-static -lz -lrt -lgmp -ldl -lcrypt -lm -lanl -lssl -lcrypto -lreadline -lncurses -lgdbm_compat -lgdbm -lffi -lutil -lyaml -pthread $(OUTFLAG)$@ |
There was a problem hiding this comment.
Patch for the link flags...
|
|
||
| echo "=========== MAKEFILE ================" | ||
| find ~/.conan/data/openstudio_ruby/2.7.2/nrel/testing/build -name "Makefile"|while read fname; do | ||
| find ~/.conan/data/openstudio_ruby/2.7.2/$CONAN_USERNAME/testing/build -name "Makefile"|while read fname; do |
There was a problem hiding this comment.
make debug work on forks too
| fail-fast: false | ||
| matrix: | ||
| build_name: [GCC-7, GCC-8, GCC-9, GCC-10, GCC-11, Apple-Clang 11, Apple-Clang 12, MSVC-2022, MSVC-2019, MSVC-2017] | ||
| build_name: [GCC-7, GCC-8, GCC-9, GCC-10, GCC-11, Apple-Clang 11, Apple-Clang 12, MSVC-2022, MSVC-2019] |
There was a problem hiding this comment.
dropping MSVC 2017 (this will be required on OS side if we want to support 2022 anyways)
There was a problem hiding this comment.
Good with me. We need to move to 2022 soon
| builder.update_build_if( | ||
| lambda build: True, | ||
| new_settings={ | ||
| "bison:build_type": "Release", | ||
| "ruby_installer:build_type": "Release", | ||
| "m4:build_type": "Release", | ||
| }, | ||
| ) |
There was a problem hiding this comment.
I had tried to pass a specific build profile to the docker but failed, cf revert in cd54db9
|
Ok this is ready to go: https://github.com/jmarrec/conan-openstudio-ruby/runs/6564537150?check_suite_focus=true I have tested locally that I can build OpenStudio via NatLabRockies/OpenStudio#4596 |
Companion PR: NatLabRockies/OpenStudio#4596
Latest run: https://github.com/jmarrec/conan-openstudio-ruby/runs/6564537150?check_suite_focus=true
Original Post:
It's running on my fork, https://github.com/jmarrec/conan-openstudio-ruby/runs/5785999801?check_suite_focus=true
I have an issue...: