You are not logged in.
Pages: 1
Hi all,
I am trying to use a commercial software MSC Marc with ifort [user subroutine].
ifort is working because I am able to compile a dummy fortran file.
When I try to compile an user suborutine with Marc it gives me this error:
/home/username/MSC/2014.2/marc2014.2/lib/linux64i8/casilib.a(unicodeutils.o): In function `CASI_tmpnam':
unicodeutils.c:(.text+0x1b): warning: the use of `tmpnam' is dangerous, better use `mkstemp'
ld: /home/username/MSC/2014.2/marc2014.2/lib/linux64i8/ACSI_MarcLib.a(Build_MarcLib.o): undefined reference to symbol '_ZNSt14basic_ofstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode@@GLIBCXX_3.4'
/usr/lib/libstdc++.so.6: error adding symbols: DSO missing from command line
/home/username/MSC/2014.2/marc2014.2/tools/run_marc: link failed for /home/username/Downloads/stuff.o
.I don't understand the 'DSO missing from command line'.
The exact same subroutine works flawlessly under Windows.
Thanks
Offline
Up
Offline
Maybe this can help:
ld: cannot find -lVT
ld: cannot find -ldwarf
/home/user/MSC/2014.2/marc2014.2/tools/run_marc: link failed for /home/user/Downloads/stuff.oInstalling libdwarf solved "ld: cannot find -ldwarf".
libvt is part of openmpi, but even after I install openmpi it continues to give this error.
Last edited by yellowhat (2015-10-29 20:45:30)
Offline
About the problem in the first post, you also have to add -lstdc++
Offline
Even if installing libstdc++5:
ls -al /usr/lib | grep libstdc++
-rw-r--r-- 1 root root 5301776 Aug 5 13:36 libstdc++.a
lrwxrwxrwx 1 root root 19 Aug 7 14:09 libstdc++.so -> libstdc++.so.6.0.21
lrwxrwxrwx 1 root root 18 Apr 28 2014 libstdc++.so.5 -> libstdc++.so.5.0.7
-rwxr-xr-x 1 root root 820368 Apr 28 2014 libstdc++.so.5.0.7
lrwxrwxrwx 1 root root 19 Aug 7 14:09 libstdc++.so.6 -> libstdc++.so.6.0.21
-rwxr-xr-x 1 root root 11550024 Aug 7 14:09 libstdc++.so.6.0.21I got the same error.
Offline
Not simply installing, you should add it to linker command line (it has the symbol your compilation missing in the first post). icc/ifort don't link to GCC libraries automatically.
Offline
Even if I type:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/or
ldconfig /usr/lib/gives same error.
Offline
In case this issue is not yet resolved, I have come across a similar problem with the RedHat version of MSC.Marc 2014.2 on an Ubuntu installation.
As indicated by #Goresome, the linker option needs to be added to the command line. However, with Marc, this is not controlled explicitly by the user but is set from a configuration file "include_linux64" (or "include" if you're 32 bit) within the Marc "tools" directory, which is called by the "run_marc" script when user subroutine compilation is flagged.
You need to change the line
LINK_OPT= to
LINK_OPT="-lstdc++"Depending on how you installed Marc, you may need root permissions to change the "include_linux64" file.
This worked for me.
P.S. I had another issue with some preprocessor directives in one of the common blocks but that is another story and should be unrelated to the linking issue.
Last edited by alennon (2015-12-10 16:08:14)
Offline
Pages: 1