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

Auto-generated documentation for SYSTEM compiler is incorrect #4584

Open
ocaisa opened this issue Jul 23, 2024 · 5 comments · Fixed by #4585
Open

Auto-generated documentation for SYSTEM compiler is incorrect #4584

ocaisa opened this issue Jul 23, 2024 · 5 comments · Fixed by #4585
Milestone

Comments

@ocaisa
Copy link
Member

ocaisa commented Jul 23, 2024

The docs at https://docs.easybuild.io/version-specific/toolchain-opts/#system claim that SYSTEM supports toolchainopts but it actually doesn't

@ocaisa
Copy link
Member Author

ocaisa commented Jul 23, 2024

I imagine that if the SYSTEM compiler is not intended to support this then it should override 'COMPILER_SHARED_OPTS' and 'COMPILER_UNIQUE_OPTS' in https://github.com/easybuilders/easybuild-framework/blob/develop/easybuild/toolchains/system.py

@Micket
Copy link
Contributor

Micket commented Jul 23, 2024

Is there any compelling reason why it shouldn't support toolchainopts? Is it because we don't expect it to necessarily be GCC? I think we do expect that, implicitly, so why not let it set things like debug or lowopt etc.?

@ocaisa
Copy link
Member Author

ocaisa commented Jul 23, 2024

We don't know what version it is, so behaviour would not be easy to determine. I'll open a PR to remove the toolchainopts and we can discuss there if there are some that should be supported

@branfosj
Copy link
Member

It is not just the documentation:

== Temporary log file in case of crash /dev/shm/branfosj/tmp-up-EL8/eb-wkdpvqyb/easybuild-79o4m74_.log
ERROR: Failed to process easyconfig /rds/projects/2017/branfosj-rse/easybuild/src/easybuild-easyconfigs/easybuild/easyconfigs/zlib-1.3.1.eb: Undefined toolchain option extra_flags specified (known options: cciscxx,pic,ieee,noopt,lowopt,defaultopt,opt,optarch,strict,precise,defaultprec,loose,veryloose,verbose,debug,i8,r8,unroll,cstd,shared,static,openmp,vectorize,packed-linker-options,rpath,extra_cflags,extra_cxxflags,extra_fflags,extra_fcflags,extra_f90flags)

This was working with zlib-1.3.1.eb with items added into toolchainopts.

@branfosj
Copy link
Member

And I now understand my confusion. In zlib-1.3.1.eb we have

toolchainopts = {'pic': True}

But then have

# need to take care of $CFLAGS ourselves with SYSTEM toolchain
# we need to add -fPIC, but should also include -O* option to avoid
# compiling with -O0 (default for GCC)
buildopts = 'CFLAGS="-O2 -fPIC"'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants