Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assertion on "type that is unsized" and crash #219

Open
Erhannis opened this issue Dec 6, 2024 · 0 comments
Open

Assertion on "type that is unsized" and crash #219

Erhannis opened this issue Dec 6, 2024 · 0 comments

Comments

@Erhannis
Copy link

Erhannis commented Dec 6, 2024

Ubuntu 22.04.5 Jammy
I'm trying to convert this cpp library to c: https://github.com/vinniefalco/DSPFilters , specifically ./shared/DSPFilters . I cloned https://github.com/llvm/llvm-project (llvmorg-19.1.1 / d401987fe349a87c53fe25829215b080b70c0c1a), built it (I think according to your instructions, rather than the llvm ones - it did build though), cloned llvm-cbe into the llvm/projects folder and built it as instructed. All fine and good. I also built the whole llvm-project directory, because it seemed like I needed llvm-link, but I'm not sure if that ended up being true. I've cloned DSPFilters (master / acc49170e79a94fcb9c04b8a2116e9f8dffd1c7d), cd shared/DSPFilters/source, and do the following:

user@user-Latitude-7400:~/clones/DSPFilters/shared/DSPFilters/source$ ll
total 160
drwxrwxr-x 2 user user  4096 Dec  6 13:07 ./
drwxrwxr-x 7 user user  4096 Nov 27 17:17 ../
-rw-rw-r-- 1 user user  6482 Nov 27 13:09 Bessel.cpp
-rw-rw-r-- 1 user user  6096 Nov 27 13:09 Biquad.cpp
-rw-rw-r-- 1 user user  6187 Nov 27 13:27 Butterworth.cpp
-rw-rw-r-- 1 user user  3708 Nov 27 13:09 Cascade.cpp
-rw-rw-r-- 1 user user  8336 Nov 27 13:09 ChebyshevI.cpp
-rw-rw-r-- 1 user user  8419 Nov 27 13:09 ChebyshevII.cpp
-rw-rw-r-- 1 user user  2316 Nov 27 13:09 Custom.cpp
-rw-rw-r-- 1 user user  1731 Nov 27 13:09 Design.cpp
-rw-rw-r-- 1 user user 18619 Nov 27 13:09 Documentation.cpp
-rw-rw-r-- 1 user user 10102 Nov 27 13:09 Elliptic.cpp
-rw-rw-r-- 1 user user  3123 Nov 27 13:09 Filter.cpp
-rw-rw-r-- 1 user user  8429 Nov 27 13:09 Legendre.cpp
-rw-rw-r-- 1 user user  9976 Nov 27 13:09 Param.cpp
-rw-rw-r-- 1 user user  9399 Nov 27 13:09 PoleFilter.cpp
-rw-rw-r-- 1 user user  6698 Nov 27 13:09 RBJ.cpp
-rw-rw-r-- 1 user user  4798 Nov 27 13:09 RootFinder.cpp
-rw-rw-r-- 1 user user  1814 Nov 27 13:09 State.cpp
user@user-Latitude-7400:~/clones/DSPFilters/shared/DSPFilters/source$ ~/clones/llvm-project/build/bin/clang-19 -I ../include/ -S -emit-llvm -g *.cpp
user@user-Latitude-7400:~/clones/DSPFilters/shared/DSPFilters/source$ ll
total 5288
drwxrwxr-x 2 user user   4096 Dec  6 13:12 ./
drwxrwxr-x 7 user user   4096 Nov 27 17:17 ../
-rw-rw-r-- 1 user user   6482 Nov 27 13:09 Bessel.cpp
-rw-rw-r-- 1 user user 329349 Dec  6 13:09 Bessel.ll
-rw-rw-r-- 1 user user   6096 Nov 27 13:09 Biquad.cpp
-rw-rw-r-- 1 user user 542784 Dec  6 13:09 Biquad.ll
-rw-rw-r-- 1 user user   6187 Nov 27 13:27 Butterworth.cpp
-rw-rw-r-- 1 user user 305733 Dec  6 13:09 Butterworth.ll
-rw-rw-r-- 1 user user   3708 Nov 27 13:09 Cascade.cpp
-rw-rw-r-- 1 user user 472844 Dec  6 13:09 Cascade.ll
-rw-rw-r-- 1 user user   8336 Nov 27 13:09 ChebyshevI.cpp
-rw-rw-r-- 1 user user   8419 Nov 27 13:09 ChebyshevII.cpp
-rw-rw-r-- 1 user user 331603 Dec  6 13:10 ChebyshevII.ll
-rw-rw-r-- 1 user user 330401 Dec  6 13:10 ChebyshevI.ll
-rw-rw-r-- 1 user user   2316 Nov 27 13:09 Custom.cpp
-rw-rw-r-- 1 user user 174047 Dec  6 13:10 Custom.ll
-rw-rw-r-- 1 user user   1731 Nov 27 13:09 Design.cpp
-rw-rw-r-- 1 user user 120675 Dec  6 13:10 Design.ll
-rw-rw-r-- 1 user user  18619 Nov 27 13:09 Documentation.cpp
-rw-rw-r-- 1 user user 131728 Dec  6 13:10 Documentation.ll
-rw-rw-r-- 1 user user  10102 Nov 27 13:09 Elliptic.cpp
-rw-rw-r-- 1 user user 439354 Dec  6 13:11 Elliptic.ll
-rw-rw-r-- 1 user user   3123 Nov 27 13:09 Filter.cpp
-rw-rw-r-- 1 user user 201980 Dec  6 13:11 Filter.ll
-rw-rw-r-- 1 user user   8429 Nov 27 13:09 Legendre.cpp
-rw-rw-r-- 1 user user 388413 Dec  6 13:11 Legendre.ll
-rw-rw-r-- 1 user user   9976 Nov 27 13:09 Param.cpp
-rw-rw-r-- 1 user user 276367 Dec  6 13:11 Param.ll
-rw-rw-r-- 1 user user   9399 Nov 27 13:09 PoleFilter.cpp
-rw-rw-r-- 1 user user 479864 Dec  6 13:12 PoleFilter.ll
-rw-rw-r-- 1 user user   6698 Nov 27 13:09 RBJ.cpp
-rw-rw-r-- 1 user user 249046 Dec  6 13:12 RBJ.ll
-rw-rw-r-- 1 user user   4798 Nov 27 13:09 RootFinder.cpp
-rw-rw-r-- 1 user user 320693 Dec  6 13:12 RootFinder.ll
-rw-rw-r-- 1 user user   1814 Nov 27 13:09 State.cpp
-rw-rw-r-- 1 user user 120672 Dec  6 13:12 State.ll
user@user-Latitude-7400:~/clones/DSPFilters/shared/DSPFilters/source$ ~/clones/llvm-project/build/bin/llvm-cbe Bessel.ll 
llvm-cbe: /home/user/clones/llvm-project/llvm/lib/IR/DataLayout.cpp:790: llvm::Align llvm::DataLayout::getAlignment(llvm::Type*, bool) const: Assertion `Ty->isSized() && "Cannot getTypeInfo() on a type that is unsized!"' failed.
 #0 0x0000625cc678b2a0 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /home/user/clones/llvm-project/llvm/lib/Support/Unix/Signals.inc:723:22
 #1 0x0000625cc678b6c1 PrintStackTraceSignalHandler(void*) /home/user/clones/llvm-project/llvm/lib/Support/Unix/Signals.inc:798:1
 #2 0x0000625cc6788b11 llvm::sys::RunSignalHandlers() /home/user/clones/llvm-project/llvm/lib/Support/Signals.cpp:105:20
 #3 0x0000625cc678ab38 SignalHandler(int) /home/user/clones/llvm-project/llvm/lib/Support/Unix/Signals.inc:413:1
 #4 0x00007de27ae42520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
 #5 0x00007de27ae969fc __pthread_kill_implementation ./nptl/pthread_kill.c:44:76
 #6 0x00007de27ae969fc __pthread_kill_internal ./nptl/pthread_kill.c:78:10
 #7 0x00007de27ae969fc pthread_kill ./nptl/pthread_kill.c:89:10
 #8 0x00007de27ae42476 gsignal ./signal/../sysdeps/posix/raise.c:27:6
 #9 0x00007de27ae287f3 abort ./stdlib/abort.c:81:7
#10 0x00007de27ae2871b _nl_load_domain ./intl/loadmsgcat.c:1177:9
#11 0x00007de27ae39e96 (/lib/x86_64-linux-gnu/libc.so.6+0x39e96)
#12 0x0000625cc5cdc2d0 llvm::DataLayout::getAlignment(llvm::Type*, bool) const /home/user/clones/llvm-project/llvm/lib/IR/DataLayout.cpp:791:24
#13 0x0000625cc5cdc6dc llvm::DataLayout::getABITypeAlign(llvm::Type*) const /home/user/clones/llvm-project/llvm/lib/IR/DataLayout.cpp:867:1
#14 0x0000625cc5313202 llvm_cbe::CWriter::generateHeader(llvm::Module&) /home/user/clones/llvm-project/llvm/projects/llvm-cbe/lib/Target/CBackend/CBackend.cpp:2716:55
#15 0x0000625cc5311017 llvm_cbe::CWriter::doFinalization(llvm::Module&) /home/user/clones/llvm-project/llvm/projects/llvm-cbe/lib/Target/CBackend/CBackend.cpp:2398:50
#16 0x0000625cc5e5de4f llvm::FPPassManager::doFinalization(llvm::Module&) /home/user/clones/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1504:13
#17 0x0000625cc5e5e42f (anonymous namespace)::MPPassManager::runOnModule(llvm::Module&) /home/user/clones/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1591:13
#18 0x0000625cc5e58ddb llvm::legacy::PassManagerImpl::run(llvm::Module&) /home/user/clones/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:541:13
#19 0x0000625cc5e5ea89 llvm::legacy::PassManager::run(llvm::Module&) /home/user/clones/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1683:1
#20 0x0000625cc24444a7 compileModule(char**, llvm::LLVMContext&) /home/user/clones/llvm-project/llvm/projects/llvm-cbe/tools/llvm-cbe/llvm-cbe.cpp:352:12
#21 0x0000625cc244382f main /home/user/clones/llvm-project/llvm/projects/llvm-cbe/tools/llvm-cbe/llvm-cbe.cpp:204:35
#22 0x00007de27ae29d90 __libc_start_call_main ./csu/../sysdeps/nptl/libc_start_call_main.h:58:16
#23 0x00007de27ae29e40 call_init ./csu/../csu/libc-start.c:128:20
#24 0x00007de27ae29e40 __libc_start_main ./csu/../csu/libc-start.c:379:5
#25 0x0000625cc2442f25 _start (/home/user/clones/llvm-project/build/bin/llvm-cbe+0xbc9f25)
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0.	Program arguments: /home/user/clones/llvm-project/build/bin/llvm-cbe Bessel.ll
Aborted (core dumped)

Some of the files do work, like Custom.ll, but it seems like most of them fail in this way.

I tried merging them into one .ll first, but that didn't help:

user@user-Latitude-7400:~/clones/DSPFilters/shared/DSPFilters/source$ ~/clones/llvm-project/build/bin/llvm-link *.ll -o program.ll
user@user-Latitude-7400:~/clones/DSPFilters/shared/DSPFilters/source$ ~/clones/llvm-project/build/bin/llvm-cbe program.ll 
llvm-cbe: /home/user/clones/llvm-project/llvm/lib/IR/DataLayout.cpp:790: llvm::Align llvm::DataLayout::getAlignment(llvm::Type*, bool) const: Assertion `Ty->isSized() && "Cannot getTypeInfo() on a type that is unsized!"' failed.
 #0 0x0000575a719d62a0 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /home/user/clones/llvm-project/llvm/lib/Support/Unix/Signals.inc:723:22
 #1 0x0000575a719d66c1 PrintStackTraceSignalHandler(void*) /home/user/clones/llvm-project/llvm/lib/Support/Unix/Signals.inc:798:1
 #2 0x0000575a719d3b11 llvm::sys::RunSignalHandlers() /home/user/clones/llvm-project/llvm/lib/Support/Signals.cpp:105:20
 #3 0x0000575a719d5b38 SignalHandler(int) /home/user/clones/llvm-project/llvm/lib/Support/Unix/Signals.inc:413:1
 #4 0x000073e903842520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
 #5 0x000073e9038969fc __pthread_kill_implementation ./nptl/pthread_kill.c:44:76
 #6 0x000073e9038969fc __pthread_kill_internal ./nptl/pthread_kill.c:78:10
 #7 0x000073e9038969fc pthread_kill ./nptl/pthread_kill.c:89:10
 #8 0x000073e903842476 gsignal ./signal/../sysdeps/posix/raise.c:27:6
 #9 0x000073e9038287f3 abort ./stdlib/abort.c:81:7
#10 0x000073e90382871b _nl_load_domain ./intl/loadmsgcat.c:1177:9
#11 0x000073e903839e96 (/lib/x86_64-linux-gnu/libc.so.6+0x39e96)
#12 0x0000575a70f272d0 llvm::DataLayout::getAlignment(llvm::Type*, bool) const /home/user/clones/llvm-project/llvm/lib/IR/DataLayout.cpp:791:24
#13 0x0000575a70f276dc llvm::DataLayout::getABITypeAlign(llvm::Type*) const /home/user/clones/llvm-project/llvm/lib/IR/DataLayout.cpp:867:1
#14 0x0000575a7055e202 llvm_cbe::CWriter::generateHeader(llvm::Module&) /home/user/clones/llvm-project/llvm/projects/llvm-cbe/lib/Target/CBackend/CBackend.cpp:2716:55
#15 0x0000575a7055c017 llvm_cbe::CWriter::doFinalization(llvm::Module&) /home/user/clones/llvm-project/llvm/projects/llvm-cbe/lib/Target/CBackend/CBackend.cpp:2398:50
#16 0x0000575a710a8e4f llvm::FPPassManager::doFinalization(llvm::Module&) /home/user/clones/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1504:13
#17 0x0000575a710a942f (anonymous namespace)::MPPassManager::runOnModule(llvm::Module&) /home/user/clones/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1591:13
#18 0x0000575a710a3ddb llvm::legacy::PassManagerImpl::run(llvm::Module&) /home/user/clones/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:541:13
#19 0x0000575a710a9a89 llvm::legacy::PassManager::run(llvm::Module&) /home/user/clones/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1683:1
#20 0x0000575a6d68f4a7 compileModule(char**, llvm::LLVMContext&) /home/user/clones/llvm-project/llvm/projects/llvm-cbe/tools/llvm-cbe/llvm-cbe.cpp:352:12
#21 0x0000575a6d68e82f main /home/user/clones/llvm-project/llvm/projects/llvm-cbe/tools/llvm-cbe/llvm-cbe.cpp:204:35
#22 0x000073e903829d90 __libc_start_call_main ./csu/../sysdeps/nptl/libc_start_call_main.h:58:16
#23 0x000073e903829e40 call_init ./csu/../csu/libc-start.c:128:20
#24 0x000073e903829e40 __libc_start_main ./csu/../csu/libc-start.c:379:5
#25 0x0000575a6d68df25 _start (/home/user/clones/llvm-project/build/bin/llvm-cbe+0xbc9f25)
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0.	Program arguments: /home/user/clones/llvm-project/build/bin/llvm-cbe program.ll
Aborted (core dumped)

OTOH, this fails too, so I'm not sure necessarily which step of the process is failing:

user@user-Latitude-7400:~/clones/DSPFilters/shared/DSPFilters/source$ ~/clones/llvm-project/build/bin/clang-19 program.ll -o program
/usr/bin/ld: /lib/x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x1b): undefined reference to `main'
/usr/bin/ld: /usr/bin/ld: DWARF error: invalid or unhandled FORM value: 0x23
/tmp/program-8a5069.o: in function `Dsp::Bessel::reversebessel(int, int)':
llvm-link:(.text+0x23c): undefined reference to `pow'
/usr/bin/ld: /tmp/program-8a5069.o: in function `Dsp::Bessel::AnalogLowShelf::design(int, double, Dsp::Bessel::WorkspaceBase*)':
llvm-link:(.text+0x39e): undefined reference to `pow'
/usr/bin/ld: /tmp/program-8a5069.o: in function `Dsp::Butterworth::AnalogLowShelf::design(int, double)':
llvm-link:(.text+0x19e8): undefined reference to `pow'
/usr/bin/ld: llvm-link:(.text+0x19fa): undefined reference to `pow'
/usr/bin/ld: /tmp/program-8a5069.o: in function `Dsp::ChebyshevII::AnalogLowPass::design(int, double)':
llvm-link:(.text+0x262a): undefined reference to `exp'
/usr/bin/ld: llvm-link:(.text+0x264a): undefined reference to `sqrt'
/usr/bin/ld: llvm-link:(.text+0x2679): undefined reference to `sinh'
/usr/bin/ld: llvm-link:(.text+0x269f): undefined reference to `cosh'
/usr/bin/ld: llvm-link:(.text+0x2706): undefined reference to `cos'
/usr/bin/ld: llvm-link:(.text+0x273b): undefined reference to `sin'
/usr/bin/ld: llvm-link:(.text+0x277f): undefined reference to `cos'
/usr/bin/ld: /tmp/program-8a5069.o: in function `Dsp::ChebyshevII::AnalogLowShelf::design(int, double, double)':
llvm-link:(.text+0x29ba): undefined reference to `pow'
/usr/bin/ld: llvm-link:(.text+0x29e2): undefined reference to `pow'
/usr/bin/ld: llvm-link:(.text+0x2a12): undefined reference to `pow'
/usr/bin/ld: llvm-link:(.text+0x2a84): undefined reference to `sqrt'
/usr/bin/ld: llvm-link:(.text+0x2ae7): undefined reference to `sqrt'
/usr/bin/ld: llvm-link:(.text+0x2b18): undefined reference to `pow'
/usr/bin/ld: llvm-link:(.text+0x2b2c): undefined reference to `log'
/usr/bin/ld: llvm-link:(.text+0x2b6d): undefined reference to `sqrt'
/usr/bin/ld: llvm-link:(.text+0x2b92): undefined reference to `pow'
/usr/bin/ld: llvm-link:(.text+0x2b97): undefined reference to `log'
/usr/bin/ld: llvm-link:(.text+0x2ba6): undefined reference to `sinh'
/usr/bin/ld: llvm-link:(.text+0x2bb5): undefined reference to `sinh'
/usr/bin/ld: llvm-link:(.text+0x2bc4): undefined reference to `cosh'
/usr/bin/ld: llvm-link:(.text+0x2bd3): undefined reference to `cosh'
/usr/bin/ld: llvm-link:(.text+0x2c4e): undefined reference to `sin'
/usr/bin/ld: llvm-link:(.text+0x2c63): undefined reference to `cos'
/usr/bin/ld: /tmp/program-8a5069.o: in function `Dsp::ChebyshevI::AnalogLowPass::design(int, double)':
llvm-link:(.text+0x3245): undefined reference to `exp'
/usr/bin/ld: llvm-link:(.text+0x3265): undefined reference to `sqrt'
/usr/bin/ld: llvm-link:(.text+0x3294): undefined reference to `sinh'
/usr/bin/ld: llvm-link:(.text+0x32ba): undefined reference to `cosh'
/usr/bin/ld: llvm-link:(.text+0x3324): undefined reference to `cos'
/usr/bin/ld: llvm-link:(.text+0x3360): undefined reference to `sin'
/usr/bin/ld: llvm-link:(.text+0x3460): undefined reference to `pow'
/usr/bin/ld: /tmp/program-8a5069.o: in function `Dsp::ChebyshevI::AnalogLowShelf::design(int, double, double)':
llvm-link:(.text+0x35ea): undefined reference to `pow'
/usr/bin/ld: llvm-link:(.text+0x3612): undefined reference to `pow'
/usr/bin/ld: llvm-link:(.text+0x3642): undefined reference to `pow'
/usr/bin/ld: llvm-link:(.text+0x36b4): undefined reference to `sqrt'
/usr/bin/ld: llvm-link:(.text+0x3717): undefined reference to `sqrt'
/usr/bin/ld: llvm-link:(.text+0x3748): undefined reference to `pow'
/usr/bin/ld: llvm-link:(.text+0x375c): undefined reference to `log'
/usr/bin/ld: llvm-link:(.text+0x379d): undefined reference to `sqrt'
/usr/bin/ld: llvm-link:(.text+0x37c2): undefined reference to `pow'
/usr/bin/ld: llvm-link:(.text+0x37c7): undefined reference to `log'
/usr/bin/ld: llvm-link:(.text+0x37d6): undefined reference to `sinh'
/usr/bin/ld: llvm-link:(.text+0x37e5): undefined reference to `sinh'
/usr/bin/ld: llvm-link:(.text+0x37f4): undefined reference to `cosh'
/usr/bin/ld: llvm-link:(.text+0x3803): undefined reference to `cosh'
/usr/bin/ld: llvm-link:(.text+0x387e): undefined reference to `sin'
/usr/bin/ld: llvm-link:(.text+0x3893): undefined reference to `cos'
/usr/bin/ld: /tmp/program-8a5069.o: in function `Dsp::Elliptic::Solver::ellipticK(double)':
llvm-link:(.text+0x3f77): undefined reference to `sqrt'
/usr/bin/ld: llvm-link:(.text+0x3fda): undefined reference to `sqrt'
/usr/bin/ld: /tmp/program-8a5069.o: in function `Dsp::Elliptic::AnalogLowPass::design(int, double, double)':
llvm-link:(.text+0x4116): undefined reference to `pow'
/usr/bin/ld: llvm-link:(.text+0x413d): undefined reference to `exp'
/usr/bin/ld: llvm-link:(.text+0x419f): undefined reference to `sqrt'
/usr/bin/ld: llvm-link:(.text+0x4351): undefined reference to `sqrt'
/usr/bin/ld: llvm-link:(.text+0x438a): undefined reference to `sqrt'
/usr/bin/ld: llvm-link:(.text+0x45cd): undefined reference to `pow'
/usr/bin/ld: llvm-link:(.text+0x464f): undefined reference to `sqrt'
/usr/bin/ld: llvm-link:(.text+0x47a8): undefined reference to `sqrt'
/usr/bin/ld: llvm-link:(.text+0x48e8): undefined reference to `sqrt'
/usr/bin/ld: llvm-link:(.text+0x49e5): undefined reference to `sqrt'
/usr/bin/ld: llvm-link:(.text+0x4a95): undefined reference to `sqrt'
/usr/bin/ld: llvm-link:(.text+0x4b44): undefined reference to `pow'
/usr/bin/ld: /tmp/program-8a5069.o: in function `Dsp::Elliptic::AnalogLowPass::calcsn(double)':
llvm-link:(.text+0x4ba4): undefined reference to `exp'
/usr/bin/ld: llvm-link:(.text+0x4be6): undefined reference to `pow'
/usr/bin/ld: llvm-link:(.text+0x4c0b): undefined reference to `sin'
/usr/bin/ld: /tmp/program-8a5069.o: in function `Dsp::Elliptic::AnalogLowPass::calcfz2(int)':
llvm-link:(.text+0x5646): undefined reference to `pow'
/usr/bin/ld: /tmp/program-8a5069.o: in function `Dsp::Legendre::PolynomialFinderBase::solve(int)':
llvm-link:(.text+0x5fad): undefined reference to `sqrt'
/usr/bin/ld: llvm-link:(.text+0x600f): undefined reference to `sqrt'
/usr/bin/ld: /tmp/program-8a5069.o: in function `Dsp::ParamInfo::ParamInfo()':
llvm-link:(.text+0x69f2): undefined reference to `__cxa_allocate_exception'
/usr/bin/ld: llvm-link:(.text+0x6a08): undefined reference to `std::logic_error::logic_error(char const*)'
/usr/bin/ld: llvm-link:(.text+0x6a15): undefined reference to `typeinfo for std::logic_error'
/usr/bin/ld: llvm-link:(.text+0x6a1c): undefined reference to `std::logic_error::~logic_error()'
/usr/bin/ld: llvm-link:(.text+0x6a21): undefined reference to `__cxa_throw'
/usr/bin/ld: llvm-link:(.text+0x6a36): undefined reference to `__cxa_free_exception'
/usr/bin/ld: /tmp/program-8a5069.o: in function `Dsp::ParamInfo::Int_toNativeValue(double) const':
llvm-link:(.text+0x6b3e): undefined reference to `floor'
/usr/bin/ld: /tmp/program-8a5069.o: in function `Dsp::ParamInfo::Log_toControlValue(double) const':
llvm-link:(.text+0x6bdc): undefined reference to `log'
/usr/bin/ld: llvm-link:(.text+0x6bee): undefined reference to `log'
/usr/bin/ld: llvm-link:(.text+0x6c0d): undefined reference to `log'
/usr/bin/ld: llvm-link:(.text+0x6c1f): undefined reference to `log'
/usr/bin/ld: llvm-link:(.text+0x6c3a): undefined reference to `log'
/usr/bin/ld: /tmp/program-8a5069.o:llvm-link:(.text+0x6c4c): more undefined references to `log' follow
/usr/bin/ld: /tmp/program-8a5069.o: in function `Dsp::ParamInfo::Log_toNativeValue(double) const':
llvm-link:(.text+0x6d29): undefined reference to `pow'
/usr/bin/ld: /tmp/program-8a5069.o: in function `Dsp::ParamInfo::Pow2_toControlValue(double) const':
llvm-link:(.text+0x6d5f): undefined reference to `log'
/usr/bin/ld: llvm-link:(.text+0x6d71): undefined reference to `log'
/usr/bin/ld: /tmp/program-8a5069.o: in function `Dsp::ParamInfo::Pow2_toNativeValue(double) const':
llvm-link:(.text+0x6dda): undefined reference to `pow'
/usr/bin/ld: /tmp/program-8a5069.o: in function `Dsp::ParamInfo::Int_toString[abi:cxx11](double) const':
llvm-link:(.text+0x6e28): undefined reference to `std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::basic_ostringstream()'
/usr/bin/ld: llvm-link:(.text+0x6e39): undefined reference to `std::ostream::operator<<(int)'
/usr/bin/ld: llvm-link:(.text+0x6e4e): undefined reference to `std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::str() const'
/usr/bin/ld: llvm-link:(.text+0x6e5c): undefined reference to `std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::~basic_ostringstream()'
/usr/bin/ld: llvm-link:(.text+0x6e8a): undefined reference to `std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::~basic_ostringstream()'
/usr/bin/ld: /tmp/program-8a5069.o: in function `Dsp::ParamInfo::Hz_toString[abi:cxx11](double) const':
llvm-link:(.text+0x6ed8): undefined reference to `std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::basic_ostringstream()'
/usr/bin/ld: llvm-link:(.text+0x6ee9): undefined reference to `std::ostream::operator<<(int)'
/usr/bin/ld: llvm-link:(.text+0x6f05): undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)'
/usr/bin/ld: llvm-link:(.text+0x6f1a): undefined reference to `std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::str() const'
/usr/bin/ld: llvm-link:(.text+0x6f28): undefined reference to `std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::~basic_ostringstream()'
/usr/bin/ld: llvm-link:(.text+0x6f56): undefined reference to `std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::~basic_ostringstream()'
/usr/bin/ld: /tmp/program-8a5069.o: in function `Dsp::ParamInfo::Real_toString[abi:cxx11](double) const':
llvm-link:(.text+0x6fa8): undefined reference to `std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::basic_ostringstream()'
/usr/bin/ld: llvm-link:(.text+0x6fbb): undefined reference to `std::ostream::operator<<(std::ios_base& (*)(std::ios_base&))'
/usr/bin/ld: llvm-link:(.text+0x6ff4): undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::operator<< <char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, std::_Setprecision)'
/usr/bin/ld: llvm-link:(.text+0x700e): undefined reference to `std::ostream::operator<<(double)'
/usr/bin/ld: llvm-link:(.text+0x7023): undefined reference to `std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::str() const'
/usr/bin/ld: llvm-link:(.text+0x7031): undefined reference to `std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::~basic_ostringstream()'
/usr/bin/ld: llvm-link:(.text+0x705f): undefined reference to `std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::~basic_ostringstream()'
/usr/bin/ld: /tmp/program-8a5069.o: in function `Dsp::ParamInfo::Db_toString[abi:cxx11](double) const':
llvm-link:(.text+0x70f6): undefined reference to `std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::basic_ostringstream()'
/usr/bin/ld: llvm-link:(.text+0x7109): undefined reference to `std::ostream::operator<<(std::ios_base& (*)(std::ios_base&))'
/usr/bin/ld: llvm-link:(.text+0x7140): undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::operator<< <char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, std::_Setprecision)'
/usr/bin/ld: llvm-link:(.text+0x715a): undefined reference to `std::ostream::operator<<(double)'
/usr/bin/ld: llvm-link:(.text+0x7176): undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)'
/usr/bin/ld: llvm-link:(.text+0x718b): undefined reference to `std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::str() const'
/usr/bin/ld: llvm-link:(.text+0x7199): undefined reference to `std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::~basic_ostringstream()'
/usr/bin/ld: llvm-link:(.text+0x71c7): undefined reference to `std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::~basic_ostringstream()'
/usr/bin/ld: /tmp/program-8a5069.o: in function `Dsp::LowPassTransform::LowPassTransform(double, Dsp::LayoutBase&, Dsp::LayoutBase const&)':
llvm-link:(.text+0x7f5e): undefined reference to `tan'
/usr/bin/ld: /tmp/program-8a5069.o: in function `Dsp::HighPassTransform::HighPassTransform(double, Dsp::LayoutBase&, Dsp::LayoutBase const&)':
llvm-link:(.text+0x82be): undefined reference to `tan'
/usr/bin/ld: /tmp/program-8a5069.o: in function `Dsp::BandPassTransform::BandPassTransform(double, double, Dsp::LayoutBase&, Dsp::LayoutBase const&)':
llvm-link:(.text+0x85ea): undefined reference to `cos'
/usr/bin/ld: llvm-link:(.text+0x8613): undefined reference to `cos'
/usr/bin/ld: llvm-link:(.text+0x8648): undefined reference to `tan'
/usr/bin/ld: llvm-link:(.text+0x8a3d): undefined reference to `tan'
/usr/bin/ld: llvm-link:(.text+0x8a6a): undefined reference to `tan'
/usr/bin/ld: llvm-link:(.text+0x8a7e): undefined reference to `sqrt'
/usr/bin/ld: llvm-link:(.text+0x8a83): undefined reference to `atan'
/usr/bin/ld: /tmp/program-8a5069.o: in function `Dsp::BandStopTransform::BandStopTransform(double, double, Dsp::LayoutBase&, Dsp::LayoutBase const&)':
llvm-link:(.text+0x904a): undefined reference to `cos'
/usr/bin/ld: llvm-link:(.text+0x9073): undefined reference to `cos'
/usr/bin/ld: llvm-link:(.text+0x90a8): undefined reference to `tan'
/usr/bin/ld: /tmp/program-8a5069.o: in function `Dsp::RBJ::LowPass::setup(double, double, double)':
llvm-link:(.text+0x99e3): undefined reference to `cos'
/usr/bin/ld: llvm-link:(.text+0x99f2): undefined reference to `sin'
/usr/bin/ld: /tmp/program-8a5069.o: in function `Dsp::RBJ::HighPass::setup(double, double, double)':
llvm-link:(.text+0x9b13): undefined reference to `cos'
/usr/bin/ld: llvm-link:(.text+0x9b22): undefined reference to `sin'
/usr/bin/ld: /tmp/program-8a5069.o: in function `Dsp::RBJ::BandPass1::setup(double, double, double)':
llvm-link:(.text+0x9c63): undefined reference to `cos'
/usr/bin/ld: llvm-link:(.text+0x9c72): undefined reference to `sin'
/usr/bin/ld: /tmp/program-8a5069.o: in function `Dsp::RBJ::BandPass2::setup(double, double, double)':
llvm-link:(.text+0x9d83): undefined reference to `cos'
/usr/bin/ld: llvm-link:(.text+0x9d92): undefined reference to `sin'
/usr/bin/ld: /tmp/program-8a5069.o: in function `Dsp::RBJ::BandStop::setup(double, double, double)':
llvm-link:(.text+0x9e93): undefined reference to `cos'
/usr/bin/ld: llvm-link:(.text+0x9ea2): undefined reference to `sin'
/usr/bin/ld: /tmp/program-8a5069.o: in function `Dsp::RBJ::LowShelf::setup(double, double, double, double)':
llvm-link:(.text+0x9fa8): undefined reference to `pow'
/usr/bin/ld: llvm-link:(.text+0x9fce): undefined reference to `cos'
/usr/bin/ld: llvm-link:(.text+0x9fdd): undefined reference to `sin'
/usr/bin/ld: llvm-link:(.text+0xa03f): undefined reference to `sqrt'
/usr/bin/ld: llvm-link:(.text+0xa05d): undefined reference to `sqrt'
/usr/bin/ld: /tmp/program-8a5069.o: in function `Dsp::RBJ::HighShelf::setup(double, double, double, double)':
llvm-link:(.text+0xa2a8): undefined reference to `pow'
/usr/bin/ld: llvm-link:(.text+0xa2ce): undefined reference to `cos'
/usr/bin/ld: llvm-link:(.text+0xa2dd): undefined reference to `sin'
/usr/bin/ld: llvm-link:(.text+0xa33f): undefined reference to `sqrt'
/usr/bin/ld: llvm-link:(.text+0xa35d): undefined reference to `sqrt'
/usr/bin/ld: /tmp/program-8a5069.o: in function `Dsp::RBJ::BandShelf::setup(double, double, double, double)':
llvm-link:(.text+0xa5a8): undefined reference to `pow'
/usr/bin/ld: llvm-link:(.text+0xa5ce): undefined reference to `cos'
/usr/bin/ld: llvm-link:(.text+0xa5dd): undefined reference to `sin'
/usr/bin/ld: llvm-link:(.text+0xa60b): undefined reference to `sinh'
/usr/bin/ld: /tmp/program-8a5069.o: in function `Dsp::RBJ::AllPass::setup(double, double, double)':
llvm-link:(.text+0xa783): undefined reference to `cos'
/usr/bin/ld: llvm-link:(.text+0xa792): undefined reference to `sin'
/usr/bin/ld: /tmp/program-8a5069.o: in function `Dsp::RootFinderBase::laguerre(int, std::complex<double>*, std::complex<double>&, int&)':
llvm-link:(.text+0xb2c7): undefined reference to `__cxa_allocate_exception'
/usr/bin/ld: llvm-link:(.text+0xb2e0): undefined reference to `std::logic_error::logic_error(char const*)'
/usr/bin/ld: llvm-link:(.text+0xb2f0): undefined reference to `typeinfo for std::logic_error'
/usr/bin/ld: llvm-link:(.text+0xb2f7): undefined reference to `std::logic_error::~logic_error()'
/usr/bin/ld: llvm-link:(.text+0xb2fc): undefined reference to `__cxa_throw'
/usr/bin/ld: llvm-link:(.text+0xb31a): undefined reference to `__cxa_free_exception'
/usr/bin/ld: /tmp/program-8a5069.o: in function `std::__complex_sqrt(double _Complex)':
llvm-link:(.text._ZSt14__complex_sqrtCd[_ZSt14__complex_sqrtCd]+0x31): undefined reference to `csqrt'
/usr/bin/ld: /tmp/program-8a5069.o: in function `std::complex<double> std::polar<double>(double const&, double const&)':
llvm-link:(.text._ZSt5polarIdESt7complexIT_ERKS1_S4_[_ZSt5polarIdESt7complexIT_ERKS1_S4_]+0x28): undefined reference to `cos'
/usr/bin/ld: llvm-link:(.text._ZSt5polarIdESt7complexIT_ERKS1_S4_[_ZSt5polarIdESt7complexIT_ERKS1_S4_]+0x53): undefined reference to `sin'
/usr/bin/ld: /tmp/program-8a5069.o: in function `__clang_call_terminate':
llvm-link:(.text.__clang_call_terminate[__clang_call_terminate]+0x5): undefined reference to `__cxa_begin_catch'
/usr/bin/ld: llvm-link:(.text.__clang_call_terminate[__clang_call_terminate]+0xa): undefined reference to `std::terminate()'
/usr/bin/ld: /tmp/program-8a5069.o: in function `std::__new_allocator<Dsp::PoleZeroPair>::deallocate(Dsp::PoleZeroPair*, unsigned long)':
llvm-link:(.text._ZNSt15__new_allocatorIN3Dsp12PoleZeroPairEE10deallocateEPS1_m[_ZNSt15__new_allocatorIN3Dsp12PoleZeroPairEE10deallocateEPS1_m]+0x21): undefined reference to `operator delete(void*, unsigned long)'
/usr/bin/ld: /tmp/program-8a5069.o: in function `std::vector<Dsp::PoleZeroPair, std::allocator<Dsp::PoleZeroPair> >::_M_check_len(unsigned long, char const*) const':
llvm-link:(.text._ZNKSt6vectorIN3Dsp12PoleZeroPairESaIS1_EE12_M_check_lenEmPKc[_ZNKSt6vectorIN3Dsp12PoleZeroPairESaIS1_EE12_M_check_lenEmPKc]+0x43): undefined reference to `std::__throw_length_error(char const*)'
/usr/bin/ld: /tmp/program-8a5069.o: in function `std::__new_allocator<Dsp::PoleZeroPair>::allocate(unsigned long, void const*)':
llvm-link:(.text._ZNSt15__new_allocatorIN3Dsp12PoleZeroPairEE8allocateEmPKv[_ZNSt15__new_allocatorIN3Dsp12PoleZeroPairEE8allocateEmPKv]+0x42): undefined reference to `std::__throw_bad_array_new_length()'
/usr/bin/ld: llvm-link:(.text._ZNSt15__new_allocatorIN3Dsp12PoleZeroPairEE8allocateEmPKv[_ZNSt15__new_allocatorIN3Dsp12PoleZeroPairEE8allocateEmPKv]+0x47): undefined reference to `std::__throw_bad_alloc()'
/usr/bin/ld: llvm-link:(.text._ZNSt15__new_allocatorIN3Dsp12PoleZeroPairEE8allocateEmPKv[_ZNSt15__new_allocatorIN3Dsp12PoleZeroPairEE8allocateEmPKv]+0x54): undefined reference to `operator new(unsigned long)'
/usr/bin/ld: /tmp/program-8a5069.o: in function `std::vector<Dsp::PoleZeroPair, std::allocator<Dsp::PoleZeroPair> >::reserve(unsigned long)':
llvm-link:(.text._ZNSt6vectorIN3Dsp12PoleZeroPairESaIS1_EE7reserveEm[_ZNSt6vectorIN3Dsp12PoleZeroPairESaIS1_EE7reserveEm]+0x39): undefined reference to `std::__throw_length_error(char const*)'
/usr/bin/ld: /tmp/program-8a5069.o: in function `std::__complex_abs(double _Complex)':
llvm-link:(.text._ZSt13__complex_absCd[_ZSt13__complex_absCd]+0x31): undefined reference to `cabs'
/usr/bin/ld: /tmp/program-8a5069.o: in function `double Dsp::asinh<double>(double)':
llvm-link:(.text._ZN3Dsp5asinhIdEET_S1_[_ZN3Dsp5asinhIdEET_S1_]+0x32): undefined reference to `sqrt'
/usr/bin/ld: llvm-link:(.text._ZN3Dsp5asinhIdEET_S1_[_ZN3Dsp5asinhIdEET_S1_]+0x43): undefined reference to `log'
/usr/bin/ld: /tmp/program-8a5069.o: in function `__cxx_global_var_init':
llvm-link:(.text.startup+0x1c): undefined reference to `std::ios_base::Init::Init()'
/usr/bin/ld: llvm-link:(.text.startup+0x23): undefined reference to `std::ios_base::Init::~Init()'
/usr/bin/ld: /tmp/program-8a5069.o: in function `__cxx_global_var_init.25':
llvm-link:(.text.startup+0x5c): undefined reference to `std::ios_base::Init::Init()'
/usr/bin/ld: llvm-link:(.text.startup+0x63): undefined reference to `std::ios_base::Init::~Init()'
/usr/bin/ld: /tmp/program-8a5069.o: in function `__cxx_global_var_init.30':
llvm-link:(.text.startup+0x9c): undefined reference to `std::ios_base::Init::Init()'
/usr/bin/ld: llvm-link:(.text.startup+0xa3): undefined reference to `std::ios_base::Init::~Init()'
/usr/bin/ld: /tmp/program-8a5069.o: in function `std::complex<double> std::pow<double>(std::complex<double> const&, double const&)':
llvm-link:(.text._ZSt3powIdESt7complexIT_ERKS2_RKS1_[_ZSt3powIdESt7complexIT_ERKS2_RKS1_]+0x48): undefined reference to `pow'
/usr/bin/ld: llvm-link:(.text._ZSt3powIdESt7complexIT_ERKS2_RKS1_[_ZSt3powIdESt7complexIT_ERKS2_RKS1_]+0x90): undefined reference to `exp'
/usr/bin/ld: /tmp/program-8a5069.o: in function `std::__complex_log(double _Complex)':
llvm-link:(.text._ZSt13__complex_logCd[_ZSt13__complex_logCd]+0x31): undefined reference to `clog'
/usr/bin/ld: /tmp/program-8a5069.o:(.data.rel.ro+0x20): undefined reference to `__cxa_pure_virtual'
/usr/bin/ld: /tmp/program-8a5069.o:(.data.rel.ro+0x28): undefined reference to `__cxa_pure_virtual'
/usr/bin/ld: /tmp/program-8a5069.o:(.data.rel.ro+0x30): undefined reference to `__cxa_pure_virtual'
/usr/bin/ld: /tmp/program-8a5069.o:(.data.rel.ro+0x38): undefined reference to `__cxa_pure_virtual'
/usr/bin/ld: /tmp/program-8a5069.o:(.data.rel.ro+0x40): undefined reference to `__cxa_pure_virtual'
/usr/bin/ld: /tmp/program-8a5069.o:(.data.rel.ro+0x48): more undefined references to `__cxa_pure_virtual' follow
/usr/bin/ld: /tmp/program-8a5069.o:(.data.rel.ro+0x78): undefined reference to `vtable for __cxxabiv1::__class_type_info'
/usr/bin/ld: /tmp/program-8a5069.o:(.data.DW.ref.__gxx_personality_v0[DW.ref.__gxx_personality_v0]+0x0): undefined reference to `__gxx_personality_v0'
clang-19: error: linker command failed with exit code 1 (use -v to see invocation)

Is there a flag I'm missing, or a step in the process, or something?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant