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

option to only build static libs #12

Closed
wants to merge 7 commits into from
Closed

Conversation

adammoody
Copy link
Contributor

@adammoody adammoody commented May 1, 2021

This is work in progress. It defines BUILD_SHARED_LIBS as an option, which if disabled, passes --disabled-shared to the lwgrp and dtcmp configure line to disable shared library builds of those.

We'd need to similarly update the other components perhaps by dropping SHARED from their ADD_LIBRARY statements.

A quick test with SCR's cmake shows we'd also need changes to the builds of the example programs.

cmake -DCMAKE_INSTALL_PREFIX=../install -DSCR_RESOURCE_MANAGER=SLURM -DBUILD_SHARED_LIBS=OFF -DSCR_LINK_STATIC=ON ../
make install
<snip>
[ 89%] Building C object examples/CMakeFiles/test_api.dir/test_api.c.o
[ 90%] Linking C executable test_api
scr-top-v3.0rc1/install/lib/libdtcmp.a(libdtcmp_la-dtcmp_sortv_cheng.o): In function `compute_weighted_median':
scr-top-v3.0rc1/dtcmp/src/dtcmp_sortv_cheng.c:82: undefined reference to `lwgrp_comm_size'
scr-top-v3.0rc1/dtcmp/src/dtcmp_sortv_cheng.c:94: undefined reference to `lwgrp_comm_alltoall'

I think we'd at least need to add a -llwgrp, but to do that, we also need a Find_Package(LWGRP). Not sure how many dominoes might fall chasing this path.

@adammoody
Copy link
Contributor Author

This is related to: LLNL/scr#322

@gonsie , would you please take a look over this when you get a chance? I think it's settled out for now, though any feedback regarding the above PR might apply here, too.

@adammoody adammoody closed this May 16, 2021
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.

None yet

1 participant