Link failures with Black Forest sac2c on Ubuntu 14.04LTS
|
|
Bugzilla Link |
1164 |
Created on |
Sep 27, 2015 19:11 |
Resolution |
DUPLICATE |
Resolved on |
Nov 04, 2015 14:59 |
Version |
svn |
OS |
Linux |
Architecture |
PC |
Extended Description
This is an attempt to separate the bugs in #1163 from one another. This
looks like a repeat of the link-order problem that we saw in
Bad Wildbad, but it looks okay to me. Here's what gcc thinks of it:
~/sac/testsuite/optimizations/pogorelationals$ sac2c WhileFunUp.sac
/usr/local/lib/sac2c/1.2.beta-BlackForest-39-e7b01/rt/host/seq/libsac.so: undefined reference to `SAC_DISTMEM_rank'
/usr/local/lib/sac2c/1.2.beta-BlackForest-39-e7b01/rt/host/seq/libsac.so: undefined reference to `SAC_DISTMEM_Abort'
/usr/local/lib/sac2c/1.2.beta-BlackForest-39-e7b01/rt/host/seq/libsac.so:
undefined reference to `SAC_DISTMEM_trace_profile_rank'
/usr/local/lib/sac2c/1.2.beta-BlackForest-39-e7b01/rt/host/seq/libsac.so: undefined reference to `SAC_HM_ShowDiagnostics'
collect2: error: ld returned 1 exit status
abort: System failed to execute shell command
abort: gcc -std=gnu99 /tmp/SAC_d6VcCj/a.out.o
abort: -L/usr/local/lib/sac2c/1.2.beta-BlackForest-39-e7b01/modlibs/host/seq
abort: -Wl,-rpath,/usr/local/lib/sac2c/1.2.beta-BlackForest-39-e7b01/modlibs/host/seq
abort: -L/usr/local/lib/sac2c/1.2.beta-BlackForest-39-e7b01/modlibs/host/seq
abort: -Wl,-rpath,/usr/local/lib/sac2c/1.2.beta-BlackForest-39-e7b01/modlibs/host/seq -L./host/seq
abort: -Wl,-rpath,./host/seq -L/usr/local/lib/sac2c/1.2.beta-BlackForest-39-e7b01/rt/host/seq
abort: -Wl,-rpath,/usr/local/lib/sac2c/1.2.beta-BlackForest-39-e7b01/rt/host/seq -lArrayMod
abort: -lArrayTransformMod -lConstantsMod -lArrayArithMod -lArrayBasicsMod -lBoolMod -lScalarArithMod
abort: -lsacpreludeMod -L/usr/local/dislin -Wl,-rpath,/usr/local/dislin -L/opt/local/lib
abort: -Wl,-rpath,/opt/local/lib -lsacphmc -lsac -lsacdistmem -lsacphmc -o a.out
abort: with exit code 1
compilation failed while Creating binary code.
My observations:
1. There is no /opt/local on this system.
2. The offending symbols, e.g., SAC_DISTMEM_rank, appear to be properly defined
in libsacdistmem.so.
3. I do not see any references to the offending symbols in libsacphmc. I.e,:
cd /usr/local/lib/sac2c/1.2.beta-BlackForest-39-e7b01/rt/host/seq$
nm libsacdistmem.so
...
00000000000007e0 T SAC_DISTMEM_Abort
0000000000201038 D SAC_DISTMEM_rank
0000000000201030 D SAC_DISTMEM_trace_profile_rank
nm libsacphmc.so |grep rank
(nothing)