Repository navigation
Closed
Labels
bugSomething isn't workingSomething isn't workingfixed-in-2024.1Issues that have been closed for the 2024.1 releaseIssues that have been closed for the 2024.1 releaseinstallationproblem with installationproblem with installationllvm-codegenissues related to the LLVM-based code generatorissues related to the LLVM-based code generator
Description
Version
2023.1 (latest)
Operating System
- Any
- Linux
- macOS
- Windows
- Other Unix
OS Version
Fedora 38
Processor
- Any
- Arm (using Rosetta)
- x86-64 (64-bit)
- Other
System Component
Installation
Severity
Critical
Description
Running the provided build.sh terminates with:
[ 11%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/Signals.cpp.o
In file included from /home/matthew/devel/smlnj/smlnj-2023.1/llvm/src/lib/Support/Signals.cpp:14:
/home/matthew/devel/smlnj/smlnj-2023.1/llvm/src/include/llvm/Support/Signals.h:117:8: error: variable or field ‘CleanupOnSignal’ declared void
117 | void CleanupOnSignal(uintptr_t Context);
| ^~~~~~~~~~~~~~~
/home/matthew/devel/smlnj/smlnj-2023.1/llvm/src/include/llvm/Support/Signals.h:117:24: error: ‘uintptr_t’ was not declared in this scope
117 | void CleanupOnSignal(uintptr_t Context);
| ^~~~~~~~~
/home/matthew/devel/smlnj/smlnj-2023.1/llvm/src/include/llvm/Support/Signals.h:18:1: note: ‘uintptr_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
17 | #include <string>
+++ |+#include <cstdint>
18 |
[ 11%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/TargetRegistry.cpp.o
[ 11%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/ThreadLocal.cpp.o
[ 11%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/Threading.cpp.o
In file included from /home/matthew/devel/smlnj/smlnj-2023.1/llvm/src/lib/Support/Signals.cpp:220:
/home/matthew/devel/smlnj/smlnj-2023.1/llvm/src/lib/Support/Unix/Signals.inc:348:44: error: ‘void llvm::sys::CleanupOnSignal(uintptr_t)’ should have been declared inside ‘llvm::sys’
348 | void sys::CleanupOnSignal(uintptr_t Context) {
| ^
[ 11%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/Valgrind.cpp.o
[ 11%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/Watchdog.cpp.o
make[2]: *** [lib/Support/CMakeFiles/LLVMSupport.dir/build.make:1742: lib/Support/CMakeFiles/LLVMSupport.dir/Signals.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:3088: lib/Support/CMakeFiles/LLVMSupport.dir/all] Error 2
make: *** [Makefile:156: all] Error 2
real 1m27.050s
user 5m14.736s
sys 0m17.362s
./build.sh: !!! Unable to build LLVM
I include the full build transcript below, but I didn't see any other meaningful warnings or errors from the ./configure step of LLVM.
Transcript
Expected Behavior
No response
Steps to Reproduce
$ git clone https://github.com/smlnj/smlnj.git
$ cd smlnj
$ curl -O https://smlnj.org/dist/working/2023.1/boot.amd64-unix.tgz
$ ./build.sh -verbose
Additional Information
No response
Email address
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingfixed-in-2024.1Issues that have been closed for the 2024.1 releaseIssues that have been closed for the 2024.1 releaseinstallationproblem with installationproblem with installationllvm-codegenissues related to the LLVM-based code generatorissues related to the LLVM-based code generator
Activity
JohnReppy commentedon Dec 14, 2023
This looks like a difference in C++ compilers (what are you using?). I tested the build on Ubuntu 22 and 20 using clang++ v14 and on macOS using clang++ v15. The fix is probably to add
#include <cstdint>at the beginning of theSignals.hheader (I assume that it must be getting included via<string>when using clang++).Since I do not have access to a Fedora installation, can you please try this fix and let me know if it fixes the issue?
JohnReppy commentedon Dec 14, 2023
Thanks for noticing that; I've fixed it.
MatthewFluet commentedon Dec 14, 2023
I have
clang++v16 installed.I tried adding
#include <cstdint>toSignals.hand the LLVM build is getting further.MatthewFluet commentedon Dec 14, 2023
With that change, the build did complete.
I get the
fgrep: warning: fgrep is obsolescent; using grep -Fwarning that was reported in smlnj/legacy#286 and reported as fixed in smlnj/legacy@1346e96, which seems not to have been ported.JohnReppy commentedon Dec 15, 2023
Thanks for testing the patch. I will modify the code with the extra
#include. I looked at more recent versions of LLVM and they have that extra include in theSignals.hheader.Add include of <cstdint> to LLVM Signals.h to fix issue #279 ("Unable