Skip to content

Bumps deps#39

Merged
tijcolem merged 24 commits intoNatLabRockies:developfrom
jmarrec:develop
May 24, 2022
Merged

Bumps deps#39
tijcolem merged 24 commits intoNatLabRockies:developfrom
jmarrec:develop

Conversation

@jmarrec
Copy link
Contributor

@jmarrec jmarrec commented Apr 1, 2022

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...:

  • openssl 1.1.1n won't build on GCC 7 and 8 on CI (it works fine locally on my ubuntu 20.04 machine...)
 /home/conan/.conan/data/openssl/1.1.1n/_/_/package/d50a0d523d98c15bb147b18fa7d203887c38be8b/lib/libcrypto.a(threads_pthread.o): In function `fork_once_func':
threads_pthread.c:(.text+0x16): undefined reference to `pthread_atfork'
collect2: error: ld returned 1 exit status
  • openssl 1.1.0l won't build in debug on msvc-2022 (and there is no binary package for it):
2022-04-01T10:39:08.7868654Z 	set ASM=nasm
2022-04-01T10:39:08.7869883Z 	"C:\.conan\18ba5c\1\bin\perl.exe" "crypto\aes\asm\aes-x86_64.pl" auto crypto\aes\aes-x86_64.asm
2022-04-01T10:39:09.0013273Z 	nasm -f win64 -DNEAR -Ox -g -ocrypto\aes\aes-x86_64.obj "crypto\aes\aes-x86_64.asm"
2022-04-01T10:39:09.8242544Z NMAKE : fatal error U1077: 'C:\Users\runneradmin\.conan\data\nasm\2.14\_\_\package\01edd76db8e16db9b38c3cca44ec466a9444c388\bin\nasm.EXE' : return code '0xc0000005'
2022-04-01T10:39:09.8243466Z Stop.
2022-04-01T10:39:09.8274678Z NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.31.31103\bin\HostX64\x64\nmake.exe"' : return code '0x2'
2022-04-01T10:39:09.8275272Z Stop.

jmarrec added 12 commits April 1, 2022 12:07
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 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
@jmarrec
Copy link
Contributor Author

jmarrec commented Apr 1, 2022

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...

ORIGINAL LINK FLAGS = -Wl,-rpath,/home/conan/.conan/data/openstudio_ruby/2.7.2/jmarrec/testing/build/9f9bc9c7ba86f123c671ad0cd57bd027161f8634/Ruby-prefix/src/Ruby-install/lib
 -lruby-static -lz -lpthread -lrt -lrt -lgmp -ldl -lcrypt -lm -lz -lpthread
 -lrt -lrt -lgmp -ldl -lcrypt -lm -lm -lanl -lssl -lcrypto
 -lreadline -lncurses -lgdbm_compat -lgdbm -lz -ldl -lffi -lutil -lyaml -lanl -lssl -lcrypto 
 -lreadline -lncurses -lgdbm_compat -lgdbm -lz -ldl -lffi -lutil -lyaml

Here are the link flags that work with conanio/gcc7: Removing duplicates, moving -pthread (not -lpthread at the end)

NEW LINK FLAGS =  -Wl,-rpath,/home/conan/.conan/data/openstudio_ruby/2.7.2/jmarrec/testing/build/9f9bc9c7ba86f123c671ad0cd57bd027161f8634/Ruby-prefix/src/Ruby-install/lib
 -lruby-static -lz -lrt -lgmp -ldl -lcrypt -lm -lanl -lssl -lcrypto 
 -lreadline -lncurses -lgdbm_compat -lgdbm -lffi -lutil -lyaml -pthread

@jmarrec jmarrec requested a review from tijcolem April 1, 2022 16:13
@jmarrec jmarrec self-assigned this Apr 1, 2022
@jmarrec jmarrec added the enhancement New feature or request label Apr 1, 2022
&& ${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
Copy link
Contributor Author

Choose a reason for hiding this comment

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

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)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

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")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

bump all deps

RUBY_FUNC_EXPORTED size_t
rb_yytnamerr(struct parser_params *p, char *yyres, const char *yystr)
{
- YYUSE(p);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

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}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

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
Copy link
Contributor Author

Choose a reason for hiding this comment

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

including windows

Comment on lines +24 to +25
+ $(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)$@
Copy link
Contributor Author

Choose a reason for hiding this comment

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

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
Copy link
Contributor Author

Choose a reason for hiding this comment

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

make debug work on forks too

jmarrec added a commit to jmarrec/OpenStudio that referenced this pull request Apr 1, 2022
jmarrec added a commit to jmarrec/OpenStudio that referenced this pull request Apr 4, 2022
@jmarrec
Copy link
Contributor Author

jmarrec commented May 23, 2022

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]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

dropping MSVC 2017 (this will be required on OS side if we want to support 2022 anyways)

Copy link
Collaborator

Choose a reason for hiding this comment

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

Good with me. We need to move to 2022 soon

Comment on lines +52 to +59
builder.update_build_if(
lambda build: True,
new_settings={
"bison:build_type": "Release",
"ruby_installer:build_type": "Release",
"m4:build_type": "Release",
},
)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I had tried to pass a specific build profile to the docker but failed, cf revert in cd54db9

@jmarrec
Copy link
Contributor Author

jmarrec commented May 24, 2022

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

@tijcolem tijcolem merged commit 3bd0590 into NatLabRockies:develop May 24, 2022
@jmarrec jmarrec deleted the develop branch June 13, 2022 14:52
jmarrec added a commit to NatLabRockies/OpenStudio that referenced this pull request Jun 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants