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

add YOGRT_LIBRARIES to SCR_EXTERNAL_SERIAL_LIBS #500

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

Alessandro-Barbieri
Copy link

No description provided.

@adammoody
Copy link
Contributor

Thanks, @Alessandro-Barbieri . I think we only call libyogrt from the main SCR library, so in theory we shouldn't have to link to libyogrt in the serial binaries.

Does this PR resolve a link error that you're seeing? Can you forward the error info?

@Alessandro-Barbieri
Copy link
Author

[53/78] /usr/bin/x86_64-pc-linux-gnu-gcc  -I/var/tmp/portage/sys-cluster/scr-3.0/work/scr-3.0/src -I/var/tmp/portage/sys-cluster/scr-3.0/work/scr-3.0_build -D_GLIBCXX_ASSERTIONS -Wall -Os -pipe -march=native -fdiagnostics-color=always -frecord-gcc-switches -fexceptions -fstack-clash-protection -fcf-protection=full -fasynchronous-unwind-tables -ftree-vectorize -fplugin=annobin -Waddress -Waggressive-loop-optimizations -Warray-bounds -Wclobbered -Wdate-time -Wformat -Wformat-security -Wfree-nonheap-object -Wnonnull -Wparentheses -Wpointer-arith -Wreturn-local-addr -Wsizeof-pointer-memaccess -Wstrict-aliasing -Wuninitialized -Wunused-value -Wvolatile-register-var -Wno-error=implicit-function-declaration -Wimplicit-function-declaration -fPIE -MD -MT src/CMakeFiles/scr_crc32.dir/scr_crc32.c.o -MF src/CMakeFiles/scr_crc32.dir/scr_crc32.c.o.d -o src/CMakeFiles/scr_crc32.dir/scr_crc32.c.o -c /var/tmp/portage/sys-cluster/scr-3.0/work/scr-3.0/src/scr_crc32.c
[54/78] : && /usr/bin/x86_64-pc-linux-gnu-gcc -Wall -Os -pipe -march=native -fdiagnostics-color=always -frecord-gcc-switches -fexceptions -fstack-clash-protection -fcf-protection=full -fasynchronous-unwind-tables -ftree-vectorize -fplugin=annobin -Waddress -Waggressive-loop-optimizations -Warray-bounds -Wclobbered -Wdate-time -Wformat -Wformat-security -Wfree-nonheap-object -Wnonnull -Wparentheses -Wpointer-arith -Wreturn-local-addr -Wsizeof-pointer-memaccess -Wstrict-aliasing -Wuninitialized -Wunused-value -Wvolatile-register-var -Wno-error=implicit-function-declaration -Wimplicit-function-declaration -Wl,-O1 -Wl,--as-needed -Wl,--sort-common    -rdynamic src/CMakeFiles/scr_crc32.dir/scr_crc32.c.o -o src/scr_crc32  -Wl,-rpath,/var/tmp/portage/sys-cluster/scr-3.0/work/scr-3.0_build/src  src/libscr_base.so  -laxl  -lredset_base  -lspath_base  -lkvtree_base  -lz  -lpthread && :
FAILED: src/scr_crc32
: && /usr/bin/x86_64-pc-linux-gnu-gcc -Wall -Os -pipe -march=native -fdiagnostics-color=always -frecord-gcc-switches -fexceptions -fstack-clash-protection -fcf-protection=full -fasynchronous-unwind-tables -ftree-vectorize -fplugin=annobin -Waddress -Waggressive-loop-optimizations -Warray-bounds -Wclobbered -Wdate-time -Wformat -Wformat-security -Wfree-nonheap-object -Wnonnull -Wparentheses -Wpointer-arith -Wreturn-local-addr -Wsizeof-pointer-memaccess -Wstrict-aliasing -Wuninitialized -Wunused-value -Wvolatile-register-var -Wno-error=implicit-function-declaration -Wimplicit-function-declaration -Wl,-O1 -Wl,--as-needed -Wl,--sort-common    -rdynamic src/CMakeFiles/scr_crc32.dir/scr_crc32.c.o -o src/scr_crc32  -Wl,-rpath,/var/tmp/portage/sys-cluster/scr-3.0/work/scr-3.0_build/src  src/libscr_base.so  -laxl  -lredset_base  -lspath_base  -lkvtree_base  -lz  -lpthread && :
/usr/lib/gcc/x86_64-pc-linux-gnu/11.2.1/../../../../x86_64-pc-linux-gnu/bin/ld: src/libscr_base.so: undefined reference to `yogrt_remaining'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

@adammoody
Copy link
Contributor

adammoody commented Mar 29, 2022

Thanks, @Alessandro-Barbieri . That's helpful. For some reason, I don't see the same error in my link. Maybe the linker version or option is the difference.

Rather than add libyogrt to the link, I'm wondering if we can drop the scr_env.c file from the objects in the serial binaries. Does it work if you drop scr_env.c from the noMPI sources here?

scr_env.c

@Alessandro-Barbieri
Copy link
Author

That's because yogrt_remaining is used in scr_env.c and it will end in scr_base.a (in this case you get no errors because it's static)
but if you try to build scr_base.so as in #454 you'll get that error at link time

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.

2 participants