First time that happens to me. I do not know why it complains in such an easy step. I have seen the same ld error in another instances, but never on julia.
make
LINK usr/bin/julia
/usr/opt/centos/devtoolset-1.1/root/usr/bin/../libexec/gcc/x86_64-redhat-linux/4.7.2/ld: /usr/opt/centos/devtoolset-1.1/root/usr/bin/../lib /gcc/x86_64-redhat-linux/4.7.2/libstdc++_nonshared.a(system_error44.o): undefined reference to symbol '_ZTVSt14error_category##GLIBCXX_3.4.11'
/usr/opt/centos/devtoolset-1.1/root/usr/bin/../libexec/gcc/x86_64-redhat-linux/4.7.2/ld: note: '_ZTVSt14error_category##GLIBCXX_3.4.11' is defined in DSO /usr/lib64/libstdc++.so.6 so try adding it to the linker command line
/usr/lib64/libstdc++.so.6: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
make[1]: *** [/home/adrian/julia/usr/bin/julia] Error 1
make: *** [julia-ui-release] Error 2
How do I change the linkers direction for the one suggested in the output?
Related
I am updating my code from Julia v0.6 to v0.7. I get the following error at runtime:
Warning: Deprecated syntax `parametric method syntax Base.show{S (io::IO, m::Base.MIME("text/plain"), scvec::Vector{StatesContainer{S}}) around /Users/logankilpatrick/.julia/packages/SHERPA/A8APz/src/utils/states_containers.jl:74.
Use Base.show(io::IO, m::Base.MIME("text/plain"), scvec::Vector{StatesContainer{S}}) where S instead.
So I do the following:
Original code: Base.show{S}(io::IO, m::Base.MIME("text/plain"), scvec::Vector{StatesContainer{S}})
Updated Code: function Base.show(io::IO, m::Base.MIME("text/plain"), scvec::Vector{StatesContainer{S}}) where S
I still get the following error: ERROR: LoadError: LoadError: ArgumentError: invalid type for argument m in method definition for show at /Users/logankilpatrick/.julia/packages/SHERPA/A8APz/src/utils/states_containers.jl:74
All line 74 shows is: println(io, typeof(scvec))
Any suggestions as to how to resolve this issue?
Thanks!
Note: I tried commenting out what was on line 74, and re-running it. It then said there was an issue with line 76!
I also tried getting rid of the "where S" part at the end of the function but that doesn't resolve the issue.
A correct signature is:
Base.show(io::IO, m::MIME{Symbol("text/plain")}, scvec::Vector{StatesContainer{S}}) where S
I am trying to create code using ARM Assembler, and I need to call a subroutine stored in a register. As far as I know, the way to do this is:
Label:
% some code
LDR r3, =Label
BL r3
But when I try to compile that, the following error appears:
undefined reference to `r3'
collect2: ld returned 1 exit status
What am I doing wrong?
Compiled Arduino source and, at end of the build, got the unresolved symbols (function entry point names) for openr.c and writer.c
The invocation arguments used were consistent with the _open_r() and _write_r() function definitions, and they compile without errors.
Any suggestions on why this error came up, or even what openr.c and writer.c do are welcomed.
/home/digysol/arduino-1.8.0/hardware/tools/arm/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/lib/armv7e-m/fpu/libc.a(lib_a-openr.o): In function "_open_r": openr.c:(.text._open_r+0x10):
undefined reference to "_open"
/home/digysol/arduino-1.8.0/hardware/tools/arm/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/lib/armv7e-m/fpu/libc.a(lib_a-writer.o): In function "_write_r": writer.c:(.text._write_r+0x10):
undefined reference to "_write"
collect2: error: ld returned 1 exit status
undefined reference to "_open" I look at this and it automatically tells me it's a missing library.
The libc.a binary looks like it's trying to use it. So maybe libc.a is having trouble building with missing params, see a relevant question.
Can't seem to compile program with even a mention of concurrent_queue.
code contains this
#include <tbb/concurrent_queue.h>
And second I add anywhere in the code
concurrent_queue<int> tbbqueue;
This is the error I get on compile. I am able to compile some other tbb related code using tasks etc, but this for some reason is not working.
g++ -O3 -Wall -pthread -std=c++11 -ltbb -o tbbqueue.o tbbqueue.cpp
tbbqueue.cpp: In function ‘void* Agent(void*)’:
tbbqueue.cpp:46:10: warning: unused variable ‘elements’ [-Wunused-variable]
tbbqueue.cpp:47:9: warning: unused variable ‘elementsSize’ [-Wunused-variable]
/tmp/ccQg8OKZ.o: In function `tbb::strict_ppl::internal::concurrent_queue_base_v3<int>::~concurrent_queue_base_v3()':
tbbqueue.cpp:(.text._ZN3tbb10strict_ppl8internal24concurrent_queue_base_v3IiED2Ev[_ZN3tbb10strict_ppl8internal24concurrent_queue_base_v3IiED5Ev]+0x10): undefined reference to `tbb::internal::NFS_Free(void*)'
/tmp/ccQg8OKZ.o: In function `tbb::strict_ppl::concurrent_queue<int, tbb::cache_aligned_allocator<int> >::deallocate_block(void*, unsigned long)':
tbbqueue.cpp:(.text._ZN3tbb10strict_ppl16concurrent_queueIiNS_23cache_aligned_allocatorIiEEE16deallocate_blockEPvm[_ZN3tbb10strict_ppl16concurrent_queueIiNS_23cache_aligned_allocatorIiEEE16deallocate_blockEPvm]+0x4): undefined reference to `tbb::internal::NFS_Free(void*)'
/tmp/ccQg8OKZ.o: In function `tbb::strict_ppl::concurrent_queue<int, tbb::cache_aligned_allocator<int> >::allocate_block(unsigned long)':
tbbqueue.cpp:(.text._ZN3tbb10strict_ppl16concurrent_queueIiNS_23cache_aligned_allocatorIiEEE14allocate_blockEm[_ZN3tbb10strict_ppl16concurrent_queueIiNS_23cache_aligned_allocatorIiEEE14allocate_blockEm]+0xf): undefined reference to `tbb::internal::NFS_Allocate(unsigned long, unsigned long, void*)'
tbbqueue.cpp:(.text._ZN3tbb10strict_ppl16concurrent_queueIiNS_23cache_aligned_allocatorIiEEE14allocate_blockEm[_ZN3tbb10strict_ppl16concurrent_queueIiNS_23cache_aligned_allocatorIiEEE14allocate_blockEm]+0x2b): undefined reference to `tbb::internal::throw_exception_v4(tbb::internal::exception_id)'
/tmp/ccQg8OKZ.o: In function `tbb::strict_ppl::internal::concurrent_queue_base_v3<int>::~concurrent_queue_base_v3()':
tbbqueue.cpp:(.text._ZN3tbb10strict_ppl8internal24concurrent_queue_base_v3IiED0Ev[_ZN3tbb10strict_ppl8internal24concurrent_queue_base_v3IiED0Ev]+0x10): undefined reference to `tbb::internal::NFS_Free(void*)'
/tmp/ccQg8OKZ.o: In function `tbb::strict_ppl::concurrent_queue<int, tbb::cache_aligned_allocator<int> >::~concurrent_queue()':
tbbqueue.cpp:(.text._ZN3tbb10strict_ppl16concurrent_queueIiNS_23cache_aligned_allocatorIiEEED2Ev[_ZN3tbb10strict_ppl16concurrent_queueIiNS_23cache_aligned_allocatorIiEEED5Ev]+0x12d): undefined reference to `tbb::internal::NFS_Free(void*)'
/tmp/ccQg8OKZ.o: In function `tbb::strict_ppl::concurrent_queue<int, tbb::cache_aligned_allocator<int> >::~concurrent_queue()':
tbbqueue.cpp:(.text._ZN3tbb10strict_ppl16concurrent_queueIiNS_23cache_aligned_allocatorIiEEED0Ev[_ZN3tbb10strict_ppl16concurrent_queueIiNS_23cache_aligned_allocatorIiEEED0Ev]+0x12d): undefined reference to `tbb::internal::NFS_Free(void*)'
/tmp/ccQg8OKZ.o: In function `main':
tbbqueue.cpp:(.text.startup+0x32): undefined reference to `tbb::internal::NFS_Allocate(unsigned long, unsigned long, void*)'
collect2: error: ld returned 1 exit status
make: *** [tbbqueue.o] Error 1
The order, in which you specify libraries and source/object files for linking, matters.
See more details here: Why does the order in which libraries are linked sometimes cause errors in GCC?
In this case, the flag to link with TBB (-ltbb) was specified in the command line prior to the program source file (tbbqueue.cpp). So when the linker processed the TBB library it had seen no code that uses it, decided it is unnecessary, and removed all its symbols from consideration. Then, it saw external symbols in the object file compiled from tbbqueue.cpp, but not libraries where these symbols could be found.
If the order of options is changed like this:
g++ -O3 -Wall -pthread -std=c++11 -o tbbqueue.o tbbqueue.cpp -ltbb
the compilation should succeed.
I'm parsing with common lisp library meta-sexp.
When I call a rule like this (entity? (create-parser-context str)), I'm not getting any error if the str is invalid. How to get the errors displayed?
A non-match is not an error unless a rule (entity?) or the code calling it programs a non-match as failure.
See the readme. There is an example rule integer-debug?, in the center of the document, that uses a callback to report the character and position of input that failed to parse an integer.
Since rules return NIL on no-parse, to signal a fatal error: (or (entity? (create-parser-context input)) (error "Input is bad!)) could be used to bail out with an error message from an irrecoverable input error.