Linking failure on toy/tutorial program

Bug #2064814 reported by TRIPURARI SINGH
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
halide (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Tutorial program does not compile with packaged libhalide17-1, but compiles fine with the binary supplied at https://github.com/halide/Halide/releases. The program also compiles fine with the older libhalide16 on ubuntu 23.10

To reproduce the problem, try compiling https://halide-lang.org/tutorials/tutorial_lesson_01_basics.html as follows:

tutorial[1071] g++ lesson_01*.cpp -g -I /usr/include/halide17 -lHalide17 -lpthread -ldl -o lesson_01 -std=c++17
/usr/bin/ld: warning: libLLVM-18.so.1, needed by /usr/lib/gcc/x86_64-linux-gnu/13/../../../x86_64-linux-gnu/libHalide17.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/13/../../../x86_64-linux-gnu/libHalide17.so: undefined reference to `llvm::MCTargetOptions::MCTargetOptions()@LLVM_18'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/13/../../../x86_64-linux-gnu/libHalide17.so: undefined reference to `LLVMInitializeWebAssemblyTargetMC@LLVM_18'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/13/../../../x86_64-linux-gnu/libHalide17.so: undefined reference to `llvm::orc::JITTargetMachineBuilder::createTargetMachine()@LLVM_18'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/13/../../../x86_64-linux-gnu/libHalide17.so: undefined reference to `llvm::DataExtractor::getU16(unsigned long*, llvm::Error*) const@LLVM_18'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/13/../../../x86_64-linux-gnu/libHalide17.so: undefined reference to `llvm::ModuleToFunctionPassAdaptor::printPipeline(llvm::raw_ostream&, llvm::function_ref<llvm::StringRef (llvm::StringRef)>)@LLVM_18'
(snipped)

description: updated
description: updated
description: updated
description: updated
Revision history for this message
Roman Lebedev (lebedevri) wrote :

Halide 17 package, for the timespan it was built against LLVM18, was faulty (missing rebuilds, etc).
The issue was resolved in halide 17.0.2-1 package.
Please reopen if there are further issues.

```
/repositories/halide/tutorial$ g++ lesson_01*.cpp -g -I /usr/include/halide18 -lHalide18 -lpthread -ldl -o lesson_01 -std=c++17
/repositories/halide/tutorial$
```

Changed in halide (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.