From 80bab25bf0ebcbac22a68be2d2bbaed6bdb5fa62 Mon Sep 17 00:00:00 2001 From: Eric J Bohm Date: Wed, 27 Mar 2024 17:25:37 -0500 Subject: [PATCH 1/3] bugfix: use CMK_SHARED_SUF instead of a hardcoded .so --- src/scripts/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scripts/Makefile b/src/scripts/Makefile index 440075b1d0..dc5e1d960d 100644 --- a/src/scripts/Makefile +++ b/src/scripts/Makefile @@ -82,7 +82,7 @@ AMPIC AMPIF: AMPI f90charm: charm++ libcharm: charm++ - cd $(L) ; $(CHARMC) -standalone -whole-archive -c++stl -shared -o libcharm.so $(LIBCHARM_LIBS) + cd $(L) ; $(CHARMC) -standalone -whole-archive -c++stl -shared -o libcharm.$(CMK_SHARED_SUF) $(LIBCHARM_LIBS) charm4py: libcharm From c465a7fade11f08602e648b0eaee79bc3acfdea3 Mon Sep 17 00:00:00 2001 From: Ritvik Rao Date: Wed, 27 Mar 2024 17:50:20 -0500 Subject: [PATCH 2/3] comment out configure lines to allow charm4py build to proceed --- src/scripts/configure.ac | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/scripts/configure.ac b/src/scripts/configure.ac index fa7798259a..7cbe0c072d 100644 --- a/src/scripts/configure.ac +++ b/src/scripts/configure.ac @@ -874,11 +874,11 @@ EOF fi done - if test -z $got_opt_whole_archive - then - echo "Don't know how to build libcharm.so for Charm4py" - test_finish 1 - fi + # if test -z $got_opt_whole_archive + # then + # echo "Don't know how to build libcharm.so for Charm4py" + # test_finish 1 + # fi fi # Figure out if the user has asked to enable the latest language standards From 7af3e018194958e46d18d9a54c2452c407e18527 Mon Sep 17 00:00:00 2001 From: Ritvik Rao Date: Sun, 31 Mar 2024 12:44:31 -0500 Subject: [PATCH 3/3] Replace whole archive flag with all_load flag for macs --- CMakeLists.txt | 6 +++++- src/scripts/configure.ac | 10 +++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index afdef1d955..529e82175e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -974,7 +974,11 @@ if(${TARGET} STREQUAL "charm4py") set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) add_library(charm SHARED empty.cpp) set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib_so) - target_link_libraries(charm ck converse memory-default threads-default ldb-rand "-Llib/ -standalone -whole-archive -c++stl -shared") + if(CMAKE_SYSTEM_NAME STREQUAL "Darwin") + target_link_libraries(charm ck converse memory-default threads-default ldb-rand "-Llib/ -standalone -all_load -c++stl -shared") + else() + target_link_libraries(charm ck converse memory-default threads-default ldb-rand "-Llib/ -standalone -whole-archive -c++stl -shared") + endif() add_dependencies(charm hwloc) endif() diff --git a/src/scripts/configure.ac b/src/scripts/configure.ac index 7cbe0c072d..fa7798259a 100644 --- a/src/scripts/configure.ac +++ b/src/scripts/configure.ac @@ -874,11 +874,11 @@ EOF fi done - # if test -z $got_opt_whole_archive - # then - # echo "Don't know how to build libcharm.so for Charm4py" - # test_finish 1 - # fi + if test -z $got_opt_whole_archive + then + echo "Don't know how to build libcharm.so for Charm4py" + test_finish 1 + fi fi # Figure out if the user has asked to enable the latest language standards