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

Cmake issues/documentation #4

Open
JaroCamphuijsen opened this issue Sep 21, 2020 · 1 comment
Open

Cmake issues/documentation #4

JaroCamphuijsen opened this issue Sep 21, 2020 · 1 comment
Assignees
Labels
bug Something isn't working documentation Improvements or additions to documentation

Comments

@JaroCamphuijsen
Copy link
Member

JaroCamphuijsen commented Sep 21, 2020

When trying to build this model with Biocellion v3.1 framework.
Using:
gcc version 9.3.0 (Ubuntu 9.3.0-10ubuntu2)

I run into the following errors:

While compiling straight after cloning this repo:
model_routine_grid.cpp:141:6: error: no declaration matches ‘void ModelRoutine::updateIfSubgridKappaDomainBdry(int, int, const VIdx&, const VIdx&, const UBAgentData&, const UBEnv&, double&)’
  141 | void ModelRoutine::updateIfSubgridKappaDomainBdry( const S32 pdeIdx, const S32 dim, const VIdx& vIdx, const VIdx& ifSubgridVOffset, const UBAgentData& ubAgentData, const UBEnv& ubEnv, REAL& kappa ) {/* for boundary condition */

and

model_routine_grid.cpp:313:6: error: no declaration matches ‘void ModelRoutine::updatePDEBufferGridKappaDomainBdry(int, int, const VIdx&, const VIdx&, double&)’
  313 | void ModelRoutine::updatePDEBufferGridKappaDomainBdry( const S32 pdeIdx, const S32 dim, const VIdx& startVIdx, const VIdx& pdeBufferBoxVSize, REAL& kappa ) {/* for boundary condition */

After commenting out the above two erroneous methods:
cd tetra/; cgal_create_CMakeLists -s tetra; cmake -DCMAKE_BUILD_TYPE=Release -DCGAL_CXX_FLAGS="-v -shared -fPIC"; make;
/bin/sh: 1: cgal_create_CMakeLists: not found
CMake Warning:
  No source or binary directory provided.  Both will be assumed to be the
  same as the current working directory, but note that this warning will
  become a fatal error in future CMake releases.


CMake Error: The source directory "/home/jaroknor/NLeSC/InSilicoMeat/Biocellion/Biocellion-3.1/biocellion-3.1/biocellion-user/ABM-microcarriers/tetra" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
make[1]: Entering directory '/home/jaroknor/NLeSC/InSilicoMeat/Biocellion/Biocellion-3.1/biocellion-3.1/biocellion-user/ABM-microcarriers/tetra'
make[1]: *** No targets specified and no makefile found.  Stop.
make[1]: Leaving directory '/home/jaroknor/NLeSC/InSilicoMeat/Biocellion/Biocellion-3.1/biocellion-3.1/biocellion-user/ABM-microcarriers/tetra'
make: *** [Makefile:28: tetra/CMakeFiles/tetra.dir/tetra.cpp.o] Error 2

The latter is due to a missing CGAL installation.

After installing CGAL, it has the cgal_create_CMakeLists script.

Next error in line is possibly due to gcc version:
g++ -std=c++11 -shared  -Wl,-soname,libmodel.DP.SPAGENT.so -o libmodel.DP.SPAGENT.so interface_config.o interface_agent.o interface_mech_intrct.o interface_grid.o interface_output.o model_routine_config.o model_routine_grid.o model_routine_agent.o model_routine_mech_intrct.o model_routine_output.o interface_check.o  tetra/CMakeFiles/tetra.dir/tetra.cpp.o -lgmp
/usr/bin/ld: tetra/CMakeFiles/tetra.dir/tetra.cpp.o: relocation R_X86_64_TPOFF32 against symbol `_ZGVZN4CGAL30Triangulation_data_structure_3INS_37Triangulation_hierarchy_vertex_base_3INS_37Triangulation_vertex_base_with_info_3INS_7Point_3INS_5EpickEEES4_NS_27Triangulation_vertex_base_3IS4_NS_30Triangulation_ds_vertex_base_3INS0_INS2_IS5_S4_NS6_IS4_NS7_IvEEEEEENS_28Triangulation_ds_cell_base_3IvEENS_14Sequential_tagEEEEEEEEEEESC_SD_E21_insert_in_small_holeIN5boost9container12small_vectorINS_8internal11CC_iteratorINS_17Compact_containerINSB_ISJ_EENS_7DefaultESS_SS_EELb0EEELm32EvvEENSN_ISt4pairISU_iELm32EvvEEEENSP_INSQ_INS1_INS2_IS5_S4_NS6_IS4_NS7_ISJ_EEEEEEEESS_SS_SS_EELb0EEERKT_RKT0_E21vertex_pair_facet_map' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: tetra/CMakeFiles/tetra.dir/tetra.cpp.o: relocation R_X86_64_PC32 against symbol `_ZZN4CGAL26get_static_error_behaviourEvE16_error_behaviour' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
make: *** [Makefile:25: libmodel.DP.SPAGENT.so] Error 1

@JaroCamphuijsen JaroCamphuijsen added bug Something isn't working documentation Improvements or additions to documentation labels Sep 21, 2020
@JaroCamphuijsen
Copy link
Member Author

JaroCamphuijsen commented Jan 18, 2021

Solution to the last error shown above:

In

cd tetra/; cgal_create_CMakeLists -s tetra; cmake -DCMAKE_BUILD_TYPE=Release -DCGAL_CXX_FLAGS="-v -shared -fPIC"; make;

-DCGAL_CXX_FLAGS should be -DCMAKE_CXX_FLAGS

See TheCMMC/Utilities-Tetra#4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants