[Bug 244508] sysutils/slurm-wlm: Fix build with clang 10.0.0

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Fri Feb 28 20:43:46 UTC 2020


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=244508

            Bug ID: 244508
           Summary: sysutils/slurm-wlm: Fix build with clang 10.0.0
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: Individual Port(s)
          Assignee: jwb at freebsd.org
          Reporter: dim at FreeBSD.org
            Blocks: 244251
             Flags: maintainer-feedback?(jwb at freebsd.org)
          Assignee: jwb at freebsd.org

Created attachment 212032
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=212032&action=edit
Fix sysutils/slurm-wlm build with clang 10.0.0

As reported in bug 244251, with clang 10.0.0 the sysutils/slurm-wlm port fails
to build with:

libtool: link: cc -O2 -pipe
-I/wrkdirs/usr/ports/sysutils/slurm-wlm/work/slurm-19.05.5/slurm
-I/usr/local/include -fstack-protector-strong -fno-strict-aliasing
-D_THREAD_SAFE -pthread -ggdb3 -Wall -g -O1 -fno-strict-aliasing
-fstack-protector-strong -o .libs/sh5util sh5util.o
-Wl,-rpath=/usr/local/lib/slurm -Wl,--export-dynamic  -L/usr/local/lib
-L../../../../../src/api/.libs
/wrkdirs/usr/ports/sysutils/slurm-wlm/work/slurm-19.05.5/src/api/.libs/libslurmfull.so
../.libs/libhdf5_api.a -lsysinfo -lkvm -lm -ldl -lz -lsz -lhdf5 -lhdf5_hl
-pthread -Wl,-rpath -Wl,/usr/local/lib/slurm
ld: error: undefined symbol: info
>>> referenced by sh5util.c:210
>>>               sh5util.o:(main)
>>> referenced by sh5util.c:215
>>>               sh5util.o:(main)
>>> referenced by sh5util.c:220
>>>               sh5util.o:(main)
>>> referenced by sh5util.c:226
>>>               sh5util.o:(main)
>>> referenced by sh5util.c:653
>>>               sh5util.o:(_merge_step_files)
>>> referenced by sh5util.c:319
>>>               sh5util.o:(_remove_empty_output)

ld: error: undefined symbol: error
>>> referenced by sh5util.c:230
>>>               sh5util.o:(main)
>>> referenced by sh5util.c:0
>>>               sh5util.o:(_set_options)
>>> referenced by sh5util.c:0
>>>               sh5util.o:(_check_params)
>>> referenced by sh5util.c:599
>>>               sh5util.o:(_merge_step_files)
>>> referenced by sh5util.c:705
>>>               sh5util.o:(_merge_step_files)
>>> referenced by sh5util.c:718
>>>               sh5util.o:(_merge_step_files)
>>> referenced by sh5util.c:660
>>>               sh5util.o:(_merge_step_files)
>>> referenced by sh5util.c:667
>>>               sh5util.o:(_merge_step_files)
>>> referenced by sh5util.c:1148
>>>               sh5util.o:(_extract_series)
>>> referenced by sh5util.c:1155
>>>               sh5util.o:(_extract_series)
>>> referenced 21 more times
[... lots more of these...]

This is because libslurmfull.so is being linked using the following version
script:

{ global: *;
  local: *;
};

It is ambiguous if it is meant that all the symbols should be global or local,
and apparently lld 10 now chooses the latter.  Then of course none of the
symbols such as info(), error() etc can be found.

This is easily fixed by removing the "local: *" line, by patching the
Makefile.in that generates the version script.


Referenced Bugs:

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=244251
[Bug 244251] [exp-run] Against projects/clang1000-import branch
-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-ports-bugs mailing list