[Users] Close, but not quite! Undefined symbols for architecture x86_64: "__gfortran_os_error_at
Murray Wolinsky
mmwolinsky at gmail.com
Tue Apr 13 21:30:41 CDT 2021
Hi Roland,
Again, thank you!
I added LIBS=gfortran to the OptionList file and re-ran. It didn't work.
Same error -- but much, much faster!
I checked (echo $LIBS) in my console and the variable is *not* set there.
(I deleted the remainder of our email thread -- way too long -- and we both
have all the text in previous emails.)
I attached the two files you requested. The OptionsList file has the
LIBS=gfortran statement added, and it appears in the listing when I re-ran.
I believe the variable LIBS (and perhaps LIBDIRS) is supposed to be set in
the file
./repos/flesh/lib/make/known-architectures/darwin
That file is very old (2004) and, admittedly I'm not a shell programming
guy, but it contains lines which may no longer work. Specifically, if you
look at
FPP='/usr/bin/cpp'
FPP_VERSION="`$FPP --version | awk '{print $3; exit}'`"
then FPP_VERSION will not pick up the version string for the
HomeBrew install. Because when I enter
❯ */usr/local/bin/cpp-10 --version*
I get
cpp-10 (Homebrew GCC 10.2.0_4) 10.2.0
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
so the version string is no longer the 3rd field in the line as the awk
command seems to require.
Of course this is probably irrelevant -- the file may no longer be used. I
played around with awk -- which I know little about -- and came up with a
replacement for the FPP_VERSION line above which seems to work. It clearly
isn't enough by itself to update the file darwin (and was likely a waste of
time -- although somewhat educational). Specifically,
echo -e "`$FPP --version | awk 'match ($0, /[0-9]+\.[0-9]+\.[0-9]+/){print
substr($0,RSTART,RLENGTH); exit}'`"
seems to work if FPP = /usr/local/bin/cpp-10
Be all that as it may, I wonder if I should add a line like LIBDIRS =
/usr/local/lib/libgfortran.a to the OptionList file?
(Because when I enter
*❯ locate libgfortran.a*
I get
/usr/local/Cellar/gcc/10.2.0_4.reinstall/lib/gcc/10/libgfortran.a
/usr/local/lib/i386/libgfortran.a
/usr/local/lib/libgfortran.a )
What do you suggest?
I really appreciate all your help! Thank you!
Murray
On Tue, Apr 13, 2021 at 6:41 PM Roland Haas <rhaas at illinois.edu> wrote:
> Hello Murray,
>
> this may be caused by having set LDFLAGS or LIBS or similar.
> Since Cactus combine C, C++ and Fortran code and links using the g++
> wrapper one must manually list the Fotran runtime library "gfortran" as
> a library to link.
>
> It should figure that out on its own when it detects the compiler in
> use at configure time (unless you got something like "Cactus has never
> been build on this architecture" in which case somehow it failed to
> recognize the OS / compiler).
>
> You can probably fix this by adding:
>
> LIBS=gfortran
>
> to your OptionList file in configs/sim/ the run
>
> ./simfactory/bin/sim build --reconfig
>
> (--clean should not be necessary).
>
> I am not quite sure how ended up with this error if you used the files
> provided by simfactory (can you include your OptionList file and the
> file configs/sim/config-data/make.config.defn as an email attachment?),
> though.
>
> Do you happen to have a environment variable "LIBS" set, such a
> variable would most likely confuse things?
>
> Yours,
> Roland
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.einsteintoolkit.org/pipermail/users/attachments/20210413/e0651ea0/attachment.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OptionList
Type: application/octet-stream
Size: 1201 bytes
Desc: not available
Url : http://lists.einsteintoolkit.org/pipermail/users/attachments/20210413/e0651ea0/attachment.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: make.config.defn
Type: application/octet-stream
Size: 9259 bytes
Desc: not available
Url : http://lists.einsteintoolkit.org/pipermail/users/attachments/20210413/e0651ea0/attachment-0001.obj
More information about the Users
mailing list