[ET Trac] #2679: How to link an externally compiled library during ET compilation
Maria Mutz
trac-noreply at einsteintoolkit.org
Sat Jan 7 12:31:30 CST 2023
#2679: How to link an externally compiled library during ET compilation
Reporter: Maria Mutz
Status: new
Milestone:
Version:
Type: bug
Priority: major
Component: EinsteinToolkit thorn
I have compiled the COCAL code separately from the ET, generating a library for which I have the .a file. I’m trying to link to that library when compiling the ET on Expanse. When I try to link it without copying all the source files in the thorn that uses it into the src directory I get “undefined reference to” errors for anything in a subdirectory. I tried moving all the files in subdirectories into the src directory as a work-around, but then I started getting errors that look like this:
\`\`\`
/lib/../lib64/crt1.o: In function \`\_start':
\(.text\+0x24\): undefined reference to \`main'
collect2: error: ld returned 1 exit status
make\[3\]: \*\*\* \[<builtin>: include\_modulefiles\_MRNS.f90\] Error 1
make\[2\]: \*\*\* \[/home/mmutz/Cactus/lib/make/make.thornlib:113: make.checked\] Error 2
make\[1\]: \*\*\* \[/home/mmutz/Cactus/lib/make/make.configuration:179: /home/mmutz/Cactus/configs/sim17/lib/libthorn\_Cocalthorn.a\] Error 2
\`\`\`
What is the proper way to link the library during compilation?
I’ve attached a copy of my config file.
attachment: OptionList.pdf (https://api.bitbucket.org/2.0/repositories/einsteintoolkit/tickets/issues/2679/attachments/OptionList.pdf)
--
Ticket URL: https://bitbucket.org/einsteintoolkit/tickets/issues/2679/how-to-link-an-externally-compiled-library
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.einsteintoolkit.org/pipermail/trac/attachments/20230107/2a2e6ab9/attachment.html
More information about the Trac
mailing list