Rbenv fails when installing rubinius 2.5.2 - ruby

Rbenv with ruby-build fails when installing rbx-2.5.2.
System: Lubuntu 14.10
Full log can be found at https://gist.github.com/sgoblin/89034c14e8426f400b68
Output of command:
Downloading rubinius-2.5.2.tar.bz2...
-> http://dqw8nmjcqpjn7.cloudfront.net/1b077537224d4ff1f8c628e5bbe0621dc6f833bc2d67a03aa10173b72299a1a8
Installing rubinius-2.5.2...
BUILD FAILED (Ubuntu 14.10 using ruby-build 20150130-2-g8106d8f)
Inspect or clean up the working tree at /tmp/ruby-build.20150213212239.19770
Results logged to /tmp/ruby-build.20150213212239.19770.log
Last 10 log lines:
1: LD vm/vm
/usr/bin/ld: cannot find -ledit
collect2: error: ld returned 1 exit status
Error: g++ -o vm/vm vm/artifacts/accessor_primitives.cpp.o vm/artifacts/arguments.cpp.o vm/artifacts/auxiliary_threads.cpp.o vm/artifacts/bytecode_verification.cpp.o vm/artifacts/call_frame.cpp.o vm/artifacts/compiled_file.cpp.o vm/artifacts/config_parser.cpp.o vm/artifacts/console.cpp.o vm/artifacts/dispatch.cpp.o vm/artifacts/environment.cpp.o vm/artifacts/exception.cpp.o vm/artifacts/exception_point.cpp.o vm/artifacts/ffi.cpp.o vm/artifacts/ffi_util.cpp.o vm/artifacts/fiber_data.cpp.o vm/artifacts/fiber_stack.cpp.o vm/artifacts/global_cache.cpp.o vm/artifacts/helpers.cpp.o vm/artifacts/instructions.cpp.o vm/artifacts/invoke_primitives.cpp.o vm/artifacts/jit_primitives.cpp.o vm/artifacts/linkedlist.cpp.o vm/artifacts/lock.cpp.o vm/artifacts/machine_code.cpp.o vm/artifacts/marshal.cpp.o vm/artifacts/method_primitives.cpp.o vm/artifacts/metrics.cpp.o vm/artifacts/object_memory.cpp.o vm/artifacts/ontology.cpp.o vm/artifacts/oop.cpp.o vm/artifacts/park.cpp.o vm/artifacts/shared_state.cpp.o vm/artifacts/signal.cpp.o vm/artifacts/stack_variables.cpp.o vm/artifacts/state.cpp.o vm/artifacts/symbol_table.cpp.o vm/artifacts/type_info.cpp.o vm/artifacts/unwind_info.cpp.o vm/artifacts/vm.cpp.o vm/artifacts/vm_thread_state.cpp.o vm/builtin/artifacts/access_variable.cpp.o vm/builtin/artifacts/alias.cpp.o vm/builtin/artifacts/array.cpp.o vm/builtin/artifacts/atomic.cpp.o vm/builtin/artifacts/autoload.cpp.o vm/builtin/artifacts/basic_object.cpp.o vm/builtin/artifacts/bignum.cpp.o vm/builtin/artifacts/block_as_method.cpp.o vm/builtin/artifacts/block_environment.cpp.o vm/builtin/artifacts/byte_array.cpp.o vm/builtin/artifacts/call_custom_cache.cpp.o vm/builtin/artifacts/call_site.cpp.o vm/builtin/artifacts/call_unit.cpp.o vm/builtin/artifacts/call_unit_adapter.cpp.o vm/builtin/artifacts/channel.cpp.o vm/builtin/artifacts/character.cpp.o vm/builtin/artifacts/class.cpp.o vm/builtin/artifacts/compact_lookup_table.cpp.o vm/builtin/artifacts/compiled_code.cpp.o vm/builtin/artifacts/constant_cache.cpp.o vm/builtin/artifacts/constant_scope.cpp.o vm/builtin/artifacts/constant_table.cpp.o vm/builtin/artifacts/data.cpp.o vm/builtin/artifacts/dir.cpp.o vm/builtin/artifacts/encoding.cpp.o vm/builtin/artifacts/exception.cpp.o vm/builtin/artifacts/executable.cpp.o vm/builtin/artifacts/ffi_pointer.cpp.o vm/builtin/artifacts/fiber.cpp.o vm/builtin/artifacts/find_object.cpp.o vm/builtin/artifacts/fixnum.cpp.o vm/builtin/artifacts/float.cpp.o vm/builtin/artifacts/fsevent.cpp.o vm/builtin/artifacts/heap_dump.cpp.o vm/builtin/artifacts/immediates.cpp.o vm/builtin/artifacts/integer.cpp.o vm/builtin/artifacts/io.cpp.o vm/builtin/artifacts/iseq.cpp.o vm/builtin/artifacts/jit.cpp.o vm/builtin/artifacts/list.cpp.o vm/builtin/artifacts/location.cpp.o vm/builtin/artifacts/logger.cpp.o vm/builtin/artifacts/lookup_table.cpp.o vm/builtin/artifacts/method_table.cpp.o vm/builtin/artifacts/module.cpp.o vm/builtin/artifacts/mono_inline_cache.cpp.o vm/builtin/artifacts/native_function.cpp.o vm/builtin/artifacts/native_method.cpp.o vm/builtin/artifacts/object.cpp.o vm/builtin/artifacts/pack.cpp.o vm/builtin/artifacts/packed_object.cpp.o vm/builtin/artifacts/poly_inline_cache.cpp.o vm/builtin/artifacts/proc.cpp.o vm/builtin/artifacts/randomizer.cpp.o vm/builtin/artifacts/regexp.cpp.o vm/builtin/artifacts/respond_to_cache.cpp.o vm/builtin/artifacts/stat.cpp.o vm/builtin/artifacts/string.cpp.o vm/builtin/artifacts/symbol.cpp.o vm/builtin/artifacts/system.cpp.o vm/builtin/artifacts/thread.cpp.o vm/builtin/artifacts/thread_state.cpp.o vm/builtin/artifacts/thunk.cpp.o vm/builtin/artifacts/time.cpp.o vm/builtin/artifacts/tuple.cpp.o vm/builtin/artifacts/unpack.cpp.o vm/builtin/artifacts/variable_scope.cpp.o vm/builtin/artifacts/weakref.cpp.o vm/capi/artifacts/array.cpp.o vm/capi/artifacts/bignum.cpp.o vm/capi/artifacts/capi.cpp.o vm/capi/artifacts/class.cpp.o vm/capi/artifacts/complex.cpp.o vm/capi/artifacts/data.cpp.o vm/capi/artifacts/encoding.cpp.o vm/capi/artifacts/enumerator.cpp.o vm/capi/artifacts/exception.cpp.o vm/capi/artifacts/file.cpp.o vm/capi/artifacts/fixnum.cpp.o vm/capi/artifacts/float.cpp.o vm/capi/artifacts/gc.cpp.o vm/capi/artifacts/globals.cpp.o vm/capi/artifacts/handle.cpp.o vm/capi/artifacts/handles.cpp.o vm/capi/artifacts/hash.cpp.o vm/capi/artifacts/integer.cpp.o vm/capi/artifacts/io.cpp.o vm/capi/artifacts/kernel.cpp.o vm/capi/artifacts/marshal.cpp.o vm/capi/artifacts/module.cpp.o vm/capi/artifacts/mutex.cpp.o vm/capi/artifacts/numeric.cpp.o vm/capi/artifacts/object.cpp.o vm/capi/artifacts/proc.cpp.o vm/capi/artifacts/range.cpp.o vm/capi/artifacts/rational.cpp.o vm/capi/artifacts/regexp.cpp.o vm/capi/artifacts/string.cpp.o vm/capi/artifacts/struct.cpp.o vm/capi/artifacts/symbol.cpp.o vm/capi/artifacts/thread.cpp.o vm/capi/artifacts/time.cpp.o vm/capi/artifacts/util.cpp.o vm/drivers/artifacts/cli.cpp.o vm/gc/artifacts/baker.cpp.o vm/gc/artifacts/code_manager.cpp.o vm/gc/artifacts/debug.cpp.o vm/gc/artifacts/finalize.cpp.o vm/gc/artifacts/gc.cpp.o vm/gc/artifacts/heap.cpp.o vm/gc/artifacts/immix.cpp.o vm/gc/artifacts/immix_marker.cpp.o vm/gc/artifacts/inflated_headers.cpp.o vm/gc/artifacts/managed.cpp.o vm/gc/artifacts/mark_sweep.cpp.o vm/gc/artifacts/object_mark.cpp.o vm/gc/artifacts/root.cpp.o vm/gc/artifacts/walker.cpp.o vm/gc/artifacts/write_barrier.cpp.o vm/instruments/artifacts/rbxti.cpp.o vm/instruments/artifacts/tooling.cpp.o vm/llvm/artifacts/autotypes.cpp.o vm/llvm/artifacts/detection.cpp.o vm/llvm/artifacts/disassembler.cpp.o vm/llvm/artifacts/inline.cpp.o vm/llvm/artifacts/inline_block.cpp.o vm/llvm/artifacts/inline_primitive.cpp.o vm/llvm/artifacts/jit_block.cpp.o vm/llvm/artifacts/jit_builder.cpp.o vm/llvm/artifacts/jit_compiler.cpp.o vm/llvm/artifacts/jit_context.cpp.o vm/llvm/artifacts/jit_inline_block.cpp.o vm/llvm/artifacts/jit_inline_method.cpp.o vm/llvm/artifacts/jit_memory_manager.cpp.o vm/llvm/artifacts/jit_method.cpp.o vm/llvm/artifacts/jit_runtime.cpp.o vm/llvm/artifacts/jit_util.cpp.o vm/llvm/artifacts/method_info.cpp.o vm/llvm/artifacts/passes.cpp.o vm/llvm/artifacts/state.cpp.o vm/llvm/artifacts/types.cpp.o vm/missing/artifacts/crypt.c.o vm/missing/artifacts/setproctitle.c.o vm/missing/artifacts/string.cpp.o vm/missing/artifacts/windows.cpp.o vm/util/artifacts/file.cpp.o vm/util/artifacts/logger.cpp.o vm/util/artifacts/murmur_hash3.cpp.o vm/util/artifacts/random.c.o vm/util/artifacts/sha1.c.o vm/util/artifacts/siphash.c.o vm/util/artifacts/spinlock.cpp.o vm/util/artifacts/strftime.c.o vm/util/artifacts/time64.c.o vm/util/artifacts/timer.cpp.o vm/util/artifacts/timing.c.o vm/util/artifacts/utf8.c.o vm/util/artifacts/vsnprintf.c.o vendor/double-conversion/libdoubleconversion.a vendor/libffi/.libs/libffi.a vendor/libtommath/libtommath.a vendor/oniguruma/./libonig.a vendor/udis86/libudis86/.libs/libudis86.a -lm -Wl,--export-dynamic -lrt -lcrypt -ldl -lpthread -L/home/ryan/.rbenv/versions/rbx-2.5.2/lib /usr/lib/llvm-3.5/lib/libLLVMLTO.a /usr/lib/llvm-3.5/lib/libLLVMObjCARCOpts.a /usr/lib/llvm-3.5/lib/libLLVMLinker.a /usr/lib/llvm-3.5/lib/libLLVMipo.a /usr/lib/llvm-3.5/lib/libLLVMVectorize.a /usr/lib/llvm-3.5/lib/libLLVMBitWriter.a /usr/lib/llvm-3.5/lib/libLLVMIRReader.a /usr/lib/llvm-3.5/lib/libLLVMAsmParser.a /usr/lib/llvm-3.5/lib/libLLVMR600CodeGen.a /usr/lib/llvm-3.5/lib/libLLVMR600Desc.a /usr/lib/llvm-3.5/lib/libLLVMR600Info.a /usr/lib/llvm-3.5/lib/libLLVMR600AsmPrinter.a /usr/lib/llvm-3.5/lib/libLLVMSystemZDisassembler.a /usr/lib/llvm-3.5/lib/libLLVMSystemZCodeGen.a /usr/lib/llvm-3.5/lib/libLLVMSystemZAsmParser.a /usr/lib/llvm-3.5/lib/libLLVMSystemZDesc.a /usr/lib/llvm-3.5/lib/libLLVMSystemZInfo.a /usr/lib/llvm-3.5/lib/libLLVMSystemZAsmPrinter.a /usr/lib/llvm-3.5/lib/libLLVMHexagonCodeGen.a /usr/lib/llvm-3.5/lib/libLLVMHexagonAsmPrinter.a /usr/lib/llvm-3.5/lib/libLLVMHexagonDesc.a /usr/lib/llvm-3.5/lib/libLLVMHexagonInfo.a /usr/lib/llvm-3.5/lib/libLLVMNVPTXCodeGen.a /usr/lib/llvm-3.5/lib/libLLVMNVPTXDesc.a /usr/lib/llvm-3.5/lib/libLLVMNVPTXInfo.a /usr/lib/llvm-3.5/lib/libLLVMNVPTXAsmPrinter.a /usr/lib/llvm-3.5/lib/libLLVMCppBackendCodeGen.a /usr/lib/llvm-3.5/lib/libLLVMCppBackendInfo.a /usr/lib/llvm-3.5/lib/libLLVMMSP430CodeGen.a /usr/lib/llvm-3.5/lib/libLLVMMSP430Desc.a /usr/lib/llvm-3.5/lib/libLLVMMSP430Info.a /usr/lib/llvm-3.5/lib/libLLVMMSP430AsmPrinter.a /usr/lib/llvm-3.5/lib/libLLVMXCoreDisassembler.a /usr/lib/llvm-3.5/lib/libLLVMXCoreCodeGen.a /usr/lib/llvm-3.5/lib/libLLVMXCoreDesc.a /usr/lib/llvm-3.5/lib/libLLVMXCoreInfo.a /usr/lib/llvm-3.5/lib/libLLVMXCoreAsmPrinter.a /usr/lib/llvm-3.5/lib/libLLVMMipsDisassembler.a /usr/lib/llvm-3.5/lib/libLLVMMipsCodeGen.a /usr/lib/llvm-3.5/lib/libLLVMMipsAsmParser.a /usr/lib/llvm-3.5/lib/libLLVMMipsDesc.a /usr/lib/llvm-3.5/lib/libLLVMMipsInfo.a /usr/lib/llvm-3.5/lib/libLLVMMipsAsmPrinter.a /usr/lib/llvm-3.5/lib/libLLVMAArch64Disassembler.a /usr/lib/llvm-3.5/lib/libLLVMAArch64CodeGen.a /usr/lib/llvm-3.5/lib/libLLVMAArch64AsmParser.a /usr/lib/llvm-3.5/lib/libLLVMAArch64Desc.a /usr/lib/llvm-3.5/lib/libLLVMAArch64Info.a /usr/lib/llvm-3.5/lib/libLLVMAArch64AsmPrinter.a /usr/lib/llvm-3.5/lib/libLLVMAArch64Utils.a /usr/lib/llvm-3.5/lib/libLLVMARMDisassembler.a /usr/lib/llvm-3.5/lib/libLLVMARMCodeGen.a /usr/lib/llvm-3.5/lib/libLLVMARMAsmParser.a /usr/lib/llvm-3.5/lib/libLLVMARMDesc.a /usr/lib/llvm-3.5/lib/libLLVMARMInfo.a /usr/lib/llvm-3.5/lib/libLLVMARMAsmPrinter.a /usr/lib/llvm-3.5/lib/libLLVMPowerPCDisassembler.a /usr/lib/llvm-3.5/lib/libLLVMPowerPCCodeGen.a /usr/lib/llvm-3.5/lib/libLLVMPowerPCAsmParser.a /usr/lib/llvm-3.5/lib/libLLVMPowerPCDesc.a /usr/lib/llvm-3.5/lib/libLLVMPowerPCInfo.a /usr/lib/llvm-3.5/lib/libLLVMPowerPCAsmPrinter.a /usr/lib/llvm-3.5/lib/libLLVMSparcDisassembler.a /usr/lib/llvm-3.5/lib/libLLVMSparcCodeGen.a /usr/lib/llvm-3.5/lib/libLLVMSparcAsmParser.a /usr/lib/llvm-3.5/lib/libLLVMSparcDesc.a /usr/lib/llvm-3.5/lib/libLLVMSparcInfo.a /usr/lib/llvm-3.5/lib/libLLVMSparcAsmPrinter.a /usr/lib/llvm-3.5/lib/libLLVMTableGen.a /usr/lib/llvm-3.5/lib/libLLVMDebugInfo.a /usr/lib/llvm-3.5/lib/libLLVMOption.a /usr/lib/llvm-3.5/lib/libLLVMX86Disassembler.a /usr/lib/llvm-3.5/lib/libLLVMX86AsmParser.a /usr/lib/llvm-3.5/lib/libLLVMX86CodeGen.a /usr/lib/llvm-3.5/lib/libLLVMSelectionDAG.a /usr/lib/llvm-3.5/lib/libLLVMAsmPrinter.a /usr/lib/llvm-3.5/lib/libLLVMX86Desc.a /usr/lib/llvm-3.5/lib/libLLVMX86Info.a /usr/lib/llvm-3.5/lib/libLLVMX86AsmPrinter.a /usr/lib/llvm-3.5/lib/libLLVMX86Utils.a /usr/lib/llvm-3.5/lib/libLLVMJIT.a /usr/lib/llvm-3.5/lib/libLLVMLineEditor.a /usr/lib/llvm-3.5/lib/libLLVMMCAnalysis.a /usr/lib/llvm-3.5/lib/libLLVMMCDisassembler.a /usr/lib/llvm-3.5/lib/libLLVMInstrumentation.a /usr/lib/llvm-3.5/lib/libLLVMInterpreter.a /usr/lib/llvm-3.5/lib/libLLVMCodeGen.a /usr/lib/llvm-3.5/lib/libLLVMScalarOpts.a /usr/lib/llvm-3.5/lib/libLLVMInstCombine.a /usr/lib/llvm-3.5/lib/libLLVMTransformUtils.a /usr/lib/llvm-3.5/lib/libLLVMipa.a /usr/lib/llvm-3.5/lib/libLLVMAnalysis.a /usr/lib/llvm-3.5/lib/libLLVMProfileData.a /usr/lib/llvm-3.5/lib/libLLVMMCJIT.a /usr/lib/llvm-3.5/lib/libLLVMTarget.a /usr/lib/llvm-3.5/lib/libLLVMRuntimeDyld.a /usr/lib/llvm-3.5/lib/libLLVMObject.a /usr/lib/llvm-3.5/lib/libLLVMMCParser.a /usr/lib/llvm-3.5/lib/libLLVMBitReader.a /usr/lib/llvm-3.5/lib/libLLVMExecutionEngine.a /usr/lib/llvm-3.5/lib/libLLVMMC.a /usr/lib/llvm-3.5/lib/libLLVMCore.a /usr/lib/llvm-3.5/lib/libLLVMSupport.a -L/usr/lib/llvm-3.5/lib -lz -lpthread -lffi -ledit -ltinfo -ldl -lmrake aborted!
Error compiling
/tmp/ruby-build.20150213212239.19770/rubinius-2.5.2/vendor/bundle/ruby/2.2.0/gems/daedalus-core-0.2.0/lib/daedalus.rb:68:in `command'
/tmp/ruby-build.20150213212239.19770/rubinius-2.5.2/vendor/bundle/ruby/2.2.0/gems/daedalus-core-0.2.0/lib/daedalus.rb:254:in `link'
/tmp/ruby-build.20150213212239.19770/rubinius-2.5.2/vendor/bundle/ruby/2.2.0/gems/daedalus-core-0.2.0/lib/daedalus.rb:774:in `build'
/tmp/ruby-build.20150213212239.19770/rubinius-2.5.2/vendor/bundle/ruby/2.2.0/gems/daedalus-core-0.2.0/lib/daedalus.rb:877:in `block in linear_tasks'
/tmp/ruby-build.20150213212239.19770/rubinius-2.5.2/vendor/bundle/ruby/2.2.0/gems/daedalus-core-0.2.0/lib/daedalus.rb:876:in `each'
/tmp/ruby-build.20150213212239.19770/rubinius-2.5.2/vendor/bundle/ruby/2.2.0/gems/daedalus-core-0.2.0/lib/daedalus.rb:876:in `linear_tasks'
/tmp/ruby-build.20150213212239.19770/rubinius-2.5.2/vendor/bundle/ruby/2.2.0/gems/daedalus-core-0.2.0/lib/daedalus.rb:872:in `start'
/tmp/ruby-build.20150213212239.19770/rubinius-2.5.2/vendor/bundle/ruby/2.2.0/gems/daedalus-core-0.2.0/lib/daedalus.rb:989:in `block in build'
/tmp/ruby-build.20150213212239.19770/rubinius-2.5.2/vendor/bundle/ruby/2.2.0/gems/daedalus-core-0.2.0/lib/daedalus.rb:980:in `each'
/tmp/ruby-build.20150213212239.19770/rubinius-2.5.2/vendor/bundle/ruby/2.2.0/gems/daedalus-core-0.2.0/lib/daedalus.rb:980:in `build'
/tmp/ruby-build.20150213212239.19770/rubinius-2.5.2/rakelib/vm.rake:240:in `block in <top (required)>'
Tasks: TOP => install => build:build => vm/vm
(See full trace by running task with --trace)
Why is it doing this, and how can it be fixed?
Thanks!

Rubinius has a dependency to libedit and thus requires the library itself as well as its development headers to be installed. This is indicated inside the log where it states:
/usr/bin/ld: cannot find -ledit
and thus indicates that the library could not be found on your system. On Debian and Ubuntu, you can install the library with
apt-get install libedit-dev

Try installing with the following command:
CXXFLAGS=-Wno-undefined-bool-conversion bash -c 'rvm install rbx'

Related

GCC Linking Error when Building Fast RCNN

I am trying to build the source code at https://github.com/craftGBD/craftGBD in order to achieve the same results of the published paper of authors to observe whether it is reproducible or not for my term project. I realized that I have to install Fast RCNN by running Makefile inside the craftGBD/evaluation/lib folder. However, I got following results when I run Makefile using make:
/cta/users/byaman/craftEnv/bin/python setup.py build_ext --inplace
python setup.py build_ext --inplace
running build_ext
cythoning utils/bbox.pyx to utils/bbox.c
/cta/users/byaman/craftEnv/lib/python2.7/site-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /cta/users/byaman/craftGBD/evaluation/lib/utils/bbox.pyx
tree = Parsing.p_module(s, pxd, full_module_name)
cythoning nms/cpu_nms.pyx to nms/cpu_nms.c
/cta/users/byaman/craftEnv/lib/python2.7/site-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /cta/users/byaman/craftGBD/evaluation/lib/nms/cpu_nms.pyx
tree = Parsing.p_module(s, pxd, full_module_name)
cythoning nms/gpu_nms.pyx to nms/gpu_nms.cpp
/cta/users/byaman/craftEnv/lib/python2.7/site-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /cta/users/byaman/craftGBD/evaluation/lib/nms/gpu_nms.pyx
tree = Parsing.p_module(s, pxd, full_module_name)
skipping 'pycocotools/_mask.c' Cython extension (up-to-date)
building 'utils.cython_bbox' extension
['-Wno-cpp', '-Wno-unused-function'] .c ['-I/cta/users/byaman/craftEnv/lib/python2.7/site-packages/numpy/core/include', '-I/cta/users/byaman/craftEnv/include/python2.7', '-c'] ['-Wno-cpp', '-Wno-unused-function'] ['-I/cta/users/byaman/craftEnv/lib/python2.7/site-packages/numpy/core/include', '-I/cta/users/byaman/craftEnv/include/python2.7']
/cta/users/byaman/craftEnv/bin/x86_64-conda-linux-gnu-cc -fno-strict-aliasing -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O3 -pipe -DNDEBUG -fwrapv -O3 -Wall -Wstrict-prototypes -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /cta/users/byaman/craftEnv/include -I/cta/apps/opt/spack/linux-ubuntu18.04-cascadelake/gcc-10.2.0/cuda-10.0.130-zjercki4memwdfwjztmfkq2yio2jcev4/include -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /cta/users/byaman/craftEnv/include -I/cta/apps/opt/spack/linux-ubuntu18.04-cascadelake/gcc-10.2.0/cuda-10.0.130-zjercki4memwdfwjztmfkq2yio2jcev4/include -fPIC -I/cta/users/byaman/craftEnv/lib/python2.7/site-packages/numpy/core/include -I/cta/users/byaman/craftEnv/include/python2.7 -c utils/bbox.c -o build/temp.linux-x86_64-2.7/utils/bbox.o -Wno-cpp -Wno-unused-function
x86_64-conda_cos6-linux-gnu-gcc -pthread -shared -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,-rpath,/cta/users/byaman/craftEnv/lib -L/cta/users/byaman/craftEnv/lib -Wl,--no-as-needed -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections -Wl,-rpath,/cta/users/byaman/craftEnv/lib -Wl,-rpath-link,/cta/users/byaman/craftEnv/lib -L/cta/users/byaman/craftEnv/lib -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /cta/users/byaman/craftEnv/include -I/cta/apps/opt/spack/linux-ubuntu18.04-cascadelake/gcc-10.2.0/cuda-10.0.130-zjercki4memwdfwjztmfkq2yio2jcev4/include -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /cta/users/byaman/craftEnv/include -I/cta/apps/opt/spack/linux-ubuntu18.04-cascadelake/gcc-10.2.0/cuda-10.0.130-zjercki4memwdfwjztmfkq2yio2jcev4/include build/temp.linux-x86_64-2.7/utils/bbox.o -L/cta/users/byaman/craftEnv/lib -lpython2.7 -o /cta/users/byaman/craftGBD/evaluation/lib/utils/cython_bbox.so
/cta/users/byaman/craftEnv/bin/../lib/gcc/x86_64-conda-linux-gnu/9.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: /cta/users/byaman/craftEnv/lib/libc.a(__stack_chk_fail.o): relocation R_X86_64_32 against symbol `__stack_chk_guard' can not be used when making a shared object; recompile with -fPIC
collect2: error: ld returned 1 exit status
error: command 'x86_64-conda_cos6-linux-gnu-gcc' failed with exit status 1
Makefile:2: recipe for target 'all' failed
make: *** [all] Error 1
Note that my username is byaman and I run the code inside the Conda environment, which is craftEnv.
The code that is run by Makefile is:
# --------------------------------------------------------
# Fast R-CNN
# Copyright (c) 2015 Microsoft
# Licensed under The MIT License [see LICENSE for details]
# Written by Ross Girshick
# --------------------------------------------------------
import os
from os.path import join as pjoin
from setuptools import setup
from distutils.extension import Extension
from Cython.Distutils import build_ext
import subprocess
import numpy as np
def find_in_path(name, path):
"Find a file in a search path"
# Adapted fom
# http://code.activestate.com/recipes/52224-find-a-file-given-a-search-path/
for dir in path.split(os.pathsep):
binpath = pjoin(dir, name)
if os.path.exists(binpath):
return os.path.abspath(binpath)
return None
def locate_cuda():
"""Locate the CUDA environment on the system
Returns a dict with keys 'home', 'nvcc', 'include', and 'lib64'
and values giving the absolute path to each directory.
Starts by looking for the CUDAHOME env variable. If not found, everything
is based on finding 'nvcc' in the PATH.
"""
# first check if the CUDAHOME env variable is in use
if 'CUDAHOME' in os.environ:
home = os.environ['CUDAHOME']
nvcc = pjoin(home, 'bin', 'nvcc')
else:
# otherwise, search the PATH for NVCC
default_path = pjoin(os.sep, 'usr', 'local', 'cuda', 'bin')
nvcc = find_in_path('nvcc', os.environ['PATH'] + os.pathsep + default_path)
if nvcc is None:
raise EnvironmentError('The nvcc binary could not be '
'located in your $PATH. Either add it to your path, or set $CUDAHOME')
home = os.path.dirname(os.path.dirname(nvcc))
cudaconfig = {'home':home, 'nvcc':nvcc,
'include': pjoin(home, 'include'),
'lib64': pjoin(home, 'lib64')}
for k, v in cudaconfig.iteritems():
if not os.path.exists(v):
raise EnvironmentError('The CUDA %s path could not be located in %s' % (k, v))
return cudaconfig
CUDA = locate_cuda()
# Obtain the numpy include directory. This logic works across numpy versions.
try:
numpy_include = np.get_include()
except AttributeError:
numpy_include = np.get_numpy_include()
def customize_compiler_for_nvcc(self):
"""inject deep into distutils to customize how the dispatch
to gcc/nvcc works.
If you subclass UnixCCompiler, it's not trivial to get your subclass
injected in, and still have the right customizations (i.e.
distutils.sysconfig.customize_compiler) run on it. So instead of going
the OO route, I have this. Note, it's kindof like a wierd functional
subclassing going on."""
# tell the compiler it can processes .cu
self.src_extensions.append('.cu')
# save references to the default compiler_so and _comple methods
default_compiler_so = self.compiler_so
super = self._compile
# now redefine the _compile method. This gets executed for each
# object but distutils doesn't have the ability to change compilers
# based on source extension: we add it.
def _compile(obj, src, ext, cc_args, extra_postargs, pp_opts):
if os.path.splitext(src)[1] == '.cu':
# use the cuda for .cu files
self.set_executable('compiler_so', CUDA['nvcc'])
# use only a subset of the extra_postargs, which are 1-1 translated
# from the extra_compile_args in the Extension class
postargs = extra_postargs['nvcc']
else:
postargs = extra_postargs['gcc']
super(obj, src, ext, cc_args, postargs, pp_opts)
# reset the default compiler_so, which we might have changed for cuda
self.compiler_so = default_compiler_so
# inject our redefined _compile method into the class
self._compile = _compile
# run the customize_compiler
class custom_build_ext(build_ext):
def build_extensions(self):
customize_compiler_for_nvcc(self.compiler)
build_ext.build_extensions(self)
ext_modules = [
Extension(
"utils.cython_bbox",
["utils/bbox.pyx"],
extra_compile_args={'gcc': ["-Wno-cpp", "-Wno-unused-function"]},
include_dirs = [numpy_include]
),
Extension(
"nms.cpu_nms",
["nms/cpu_nms.pyx"],
extra_compile_args={'gcc': ["-Wno-cpp", "-Wno-unused-function"]},
include_dirs = [numpy_include]
),
Extension('nms.gpu_nms',
['nms/nms_kernel.cu', 'nms/gpu_nms.pyx'],
library_dirs=[CUDA['lib64']],
libraries=['cudart'],
language='c++',
runtime_library_dirs=[CUDA['lib64']],
# this syntax is specific to this build system
# we're only going to use certain compiler args with nvcc and not with
# gcc the implementation of this trick is in customize_compiler() below
extra_compile_args={'gcc': ["-Wno-unused-function"],
'nvcc': ['-arch=sm_35',
'--ptxas-options=-v',
'-c',
'--compiler-options',
"'-fPIC'"]},
include_dirs = [numpy_include, CUDA['include']]
),
Extension(
'pycocotools._mask',
sources=['pycocotools/maskApi.c', 'pycocotools/_mask.pyx'],
include_dirs = [numpy_include, 'pycocotools'],
extra_compile_args={
'gcc': ['-Wno-cpp', '-Wno-unused-function', '-std=c99']},
),
]
setup(
name='fast_rcnn',
ext_modules=ext_modules,
# inject our custom trigger
cmdclass={'build_ext': custom_build_ext},
)
I don't know how to solve this problem even though I investigated following questions/answers:
"relocation R_X86_64_32S against " linking Error
How to recompile with -fPIC
Cython wrapping a class that uses another library

How to fix "cannot find -lsqlite3" error when deploying Rust app to Heroku?

I have built an API using Rocket, Diesel and SQLite. It runs fine locally.
Now I want to deploy my API it to Heroku. I'm going off this example. I've followed the included instructions as close as I can. However, the build step returns the following error:
error: linking with `cc` failed: exit code: 1
|
= note: "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-m64" "-Wl,--eh-frame-hdr" "-L" "/tmp/codon/tmp/cache/multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "/tmp/codon/tmp/cache/target/release/deps/cardbox_api-1b33053639456c47.cardbox_api.2391d6uc-cgu.0.rcgu.o" "/tmp/codon/tmp/cache/target/release/deps/cardbox_api-1b33053639456c47.cardbox_api.2391d6uc-cgu.1.rcgu.o" "/tmp/codon/tmp/cache/target/release/deps/cardbox_api-1b33053639456c47.cardbox_api.2391d6uc-cgu.10.rcgu.o" "/tmp/codon/tmp/cache/target/release/deps/cardbox_api-1b33053639456c47.cardbox_api.2391d6uc-cgu.11.rcgu.o" "/tmp/codon/tmp/cache/target/release/deps/cardbox_api-1b33053639456c47.cardbox_api.2391d6uc-cgu.12.rcgu.o" "/tmp/codon/tmp/cache/target/release/deps/cardbox_api-1b33053639456c47.cardbox_api.2391d6uc-cgu.13.rcgu.o" "/tmp/codon/tmp/cache/target/release/deps/cardbox_api-1b33053639456c47.cardbox_api.2391d6uc-cgu.14.rcgu.o" "/tmp/codon/tmp/cache/target/release/deps/cardbox_api-1b33053639456c47.cardbox_api.2391d6uc-cgu.15.rcgu.o" "/tmp/codon/tmp/cache/target/release/deps/cardbox_api-1b33053639456c47.cardbox_api.2391d6uc-cgu.2.rcgu.o" "/tmp/codon/tmp/cache/target/release/deps/cardbox_api-1b33053639456c47.cardbox_api.2391d6uc-cgu.3.rcgu.o" "/tmp/codon/tmp/cache/target/release/deps/cardbox_api-1b33053639456c47.cardbox_api.2391d6uc-cgu.4.rcgu.o" "/tmp/codon/tmp/cache/target/release/deps/cardbox_api-1b33053639456c47.cardbox_api.2391d6uc-cgu.5.rcgu.o" "/tmp/codon/tmp/cache/target/release/deps/cardbox_api-1b33053639456c47.cardbox_api.2391d6uc-cgu.6.rcgu.o" "/tmp/codon/tmp/cache/target/release/deps/cardbox_api-1b33053639456c47.cardbox_api.2391d6uc-cgu.7.rcgu.o" "/tmp/codon/tmp/cache/target/release/deps/cardbox_api-1b33053639456c47.cardbox_api.2391d6uc-cgu.8.rcgu.o" "/tmp/codon/tmp/cache/target/release/deps/cardbox_api-1b33053639456c47.cardbox_api.2391d6uc-cgu.9.rcgu.o" "-o" "/tmp/codon/tmp/cache/target/release/deps/cardbox_api-1b33053639456c47" "/tmp/codon/tmp/cache/target/release/deps/cardbox_api-1b33053639456c47.xdi22qyw1jm4dgn.rcgu.o" "-Wl,--gc-sections" "-pie" "-Wl,-zrelro" "-Wl,-znow" "-Wl,-O1" "-nodefaultlibs" "-L" "/tmp/codon/tmp/cache/target/release/deps" "-L" "/tmp/codon/tmp/cache/target/release/build/ring-0f13c32780184988/out" "-L" "/tmp/codon/tmp/cache/multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/tmp/codon/tmp/cache/target/release/deps/libuuid-ce4969afc97ad8b9.rlib" "/tmp/codon/tmp/cache/target/release/deps/libjsonwebtoken-44a266ecba46fbf1.rlib" "/tmp/codon/tmp/cache/target/release/deps/libpem-d45dd6ee3de1c97b.rlib" "/tmp/codon/tmp/cache/target/release/deps/libregex-c1e1617462b9257c.rlib" "/tmp/codon/tmp/cache/target/release/deps/libthread_local-3948ce50dadeb546.rlib" "/tmp/codon/tmp/cache/target/release/deps/libregex_syntax-54ff6446d5044f96.rlib" "/tmp/codon/tmp/cache/target/release/deps/libaho_corasick-c99fa63c4b172ad4.rlib" "/tmp/codon/tmp/cache/target/release/deps/libsimple_asn1-4334711a5a537225.rlib" "/tmp/codon/tmp/cache/target/release/deps/libnum_bigint-109e809cd264f00a.rlib" "/tmp/codon/tmp/cache/target/release/deps/libchrono-3405124ec15564a1.rlib" "/tmp/codon/tmp/cache/target/release/deps/libnum_integer-137bdd49e20d58ff.rlib" "/tmp/codon/tmp/cache/target/release/deps/libnum_traits-2d6f0e657d8b410e.rlib" "/tmp/codon/tmp/cache/target/release/deps/libring-fea6120cdf068f14.rlib" "/tmp/codon/tmp/cache/target/release/deps/libspin-8b88071a74fd1146.rlib" "/tmp/codon/tmp/cache/target/release/deps/libuntrusted-07c812cecbdda234.rlib" "/tmp/codon/tmp/cache/target/release/deps/libreqwest-b54031f22b1a4160.rlib" "/tmp/codon/tmp/cache/target/release/deps/libhyper_tls-b12b7cccc6f3158b.rlib" "/tmp/codon/tmp/cache/target/release/deps/libipnet-5dd6b6b4ddc5ef77.rlib" "/tmp/codon/tmp/cache/target/release/deps/libtokio_tls-50f6bfe1206058f6.rlib" "/tmp/codon/tmp/cache/target/release/deps/libserde_urlencoded-b45320924fa23eeb.rlib" "/tmp/codon/tmp/cache/target/release/deps/libencoding_rs-9c06080874b247fd.rlib" "/tmp/codon/tmp/cache/target/release/deps/libbase64-a69b0bd0ffc84f09.rlib" "/tmp/codon/tmp/cache/target/release/deps/libmime_guess-90ce58d79a8765e7.rlib" "/tmp/codon/tmp/cache/target/release/deps/libunicase-420baa79e66eb7be.rlib" "/tmp/codon/tmp/cache/target/release/deps/libmime-0c405423f2f6d82d.rlib" "/tmp/codon/tmp/cache/target/release/deps/libnative_tls-cb230d67fabb8e5d.rlib" "/tmp/codon/tmp/cache/target/release/deps/libopenssl_probe-9ce2191185e4de74.rlib" "/tmp/codon/tmp/cache/target/release/deps/libopenssl-f4e1d41159b2a15c.rlib" "/tmp/codon/tmp/cache/target/release/deps/libopenssl_sys-d761d87b2bc00b93.rlib" "/tmp/codon/tmp/cache/target/release/deps/libforeign_types-289696442456e97a.rlib" "/tmp/codon/tmp/cache/target/release/deps/libforeign_types_shared-81fde169aac187d8.rlib" "/tmp/codon/tmp/cache/target/release/deps/libbitflags-ad0a1f0454a30088.rlib" "/tmp/codon/tmp/cache/target/release/deps/libhyper-7e6648b4650fe710.rlib" "/tmp/codon/tmp/cache/target/release/deps/libwant-852cffc58ffe3e6c.rlib" "/tmp/codon/tmp/cache/target/release/deps/libtry_lock-0d0e456c3c6f815b.rlib" "/tmp/codon/tmp/cache/target/release/deps/libh2-c84ec7b5ed846947.rlib" "/tmp/codon/tmp/cache/target/release/deps/libtracing_futures-79d6686b1765ad62.rlib" "/tmp/codon/tmp/cache/target/release/deps/libpin_project-aca85cf2e90e6668.rlib" "/tmp/codon/tmp/cache/target/release/deps/libtokio_util-31d259494e95e968.rlib" "/tmp/codon/tmp/cache/target/release/deps/libfutures_sink-37e79a2d3fc2a2f5.rlib" "/tmp/codon/tmp/cache/target/release/deps/libhttpdate-ec985aa61aaac5ed.rlib" "/tmp/codon/tmp/cache/target/release/deps/libsocket2-f092214f6231a7aa.rlib" "/tmp/codon/tmp/cache/target/release/deps/libtower_service-a31ecf311ec0a4e7.rlib" "/tmp/codon/tmp/cache/target/release/deps/libfutures_channel-45ffa01c0944bd39.rlib" "/tmp/codon/tmp/cache/target/release/deps/libtracing-cf742b6b1580f84f.rlib" "/tmp/codon/tmp/cache/target/release/deps/libtracing_core-4b501e5d197e1da0.rlib" "/tmp/codon/tmp/cache/target/release/deps/libtokio-5267c2e05320b616.rlib" "/tmp/codon/tmp/cache/target/release/deps/libmio-cfe69088ae62c7d6.rlib" "/tmp/codon/tmp/cache/target/release/deps/libiovec-9d674a86d4abd964.rlib" "/tmp/codon/tmp/cache/target/release/deps/libnet2-f13f190e6b162b14.rlib" "/tmp/codon/tmp/cache/target/release/deps/libpin_project_lite-ed875ae37bdc6cb3.rlib" "/tmp/codon/tmp/cache/target/release/deps/libpin_project_lite-72a128b5049f8c7c.rlib" "/tmp/codon/tmp/cache/target/release/deps/libhttp_body-2f3775be87dfaef4.rlib" "/tmp/codon/tmp/cache/target/release/deps/libfutures_util-1de6efb75e7fe6b4.rlib" "/tmp/codon/tmp/cache/target/release/deps/libfutures_io-53fa8ca8b9791d4d.rlib" "/tmp/codon/tmp/cache/target/release/deps/libslab-314cf7e98398e4c0.rlib" "/tmp/codon/tmp/cache/target/release/deps/libpin_project-486c6ceef64cfb50.rlib" "/tmp/codon/tmp/cache/target/release/deps/libfutures_task-ecf44cca64d39c5f.rlib" "/tmp/codon/tmp/cache/target/release/deps/libonce_cell-bc62e82218494945.rlib" "/tmp/codon/tmp/cache/target/release/deps/libpin_utils-8ea4b6a999ca85d6.rlib" "/tmp/codon/tmp/cache/target/release/deps/libfutures_core-ef7d112a948d9544.rlib" "/tmp/codon/tmp/cache/target/release/deps/liblazy_static-72fd4c50b9d3882e.rlib" "/tmp/codon/tmp/cache/target/release/deps/liburl-bdb51ad60a81f567.rlib" "/tmp/codon/tmp/cache/target/release/deps/libidna-2cff8351c96b71bb.rlib" "/tmp/codon/tmp/cache/target/release/deps/libform_urlencoded-6c027baec4c4b4b3.rlib" "/tmp/codon/tmp/cache/target/release/deps/libhttp-5600fc8dad0affc6.rlib" "/tmp/codon/tmp/cache/target/release/deps/libbytes-9bbef4070681ce0a.rlib" "/tmp/codon/tmp/cache/target/release/deps/libfnv-b63504f5018cc108.rlib" "/tmp/codon/tmp/cache/target/release/deps/librocket_contrib-cba39fdd66586fdc.rlib" "/tmp/codon/tmp/cache/target/release/deps/libserde_json-7e7f02c69d41a7c1.rlib" "/tmp/codon/tmp/cache/target/release/deps/libryu-b04ad59bf2ec6b7b.rlib" "/tmp/codon/tmp/cache/target/release/deps/libitoa-553452e4c159d751.rlib" "/tmp/codon/tmp/cache/target/release/deps/librocket-6517ef464b93fe21.rlib" "/tmp/codon/tmp/cache/target/release/deps/libatty-8e61528b57500acf.rlib" "/tmp/codon/tmp/cache/target/release/deps/libmemchr-6c817d998b0df8da.rlib" "/tmp/codon/tmp/cache/target/release/deps/libtoml-466f4ac1f73ff753.rlib" "/tmp/codon/tmp/cache/target/release/deps/libserde-1883d0398c1c65c4.rlib" "/tmp/codon/tmp/cache/target/release/deps/libyansi-0b1185001ec1bea1.rlib" "/tmp/codon/tmp/cache/target/release/deps/librocket_http-139bf580f4665612.rlib" "/tmp/codon/tmp/cache/target/release/deps/libhyper-d7f34df2825d890d.rlib" "/tmp/codon/tmp/cache/target/release/deps/libmime-d0060301e3786d04.rlib" "/tmp/codon/tmp/cache/target/release/deps/liblog-da4ae0efbcc6b0c2.rlib" "/tmp/codon/tmp/cache/target/release/deps/liblanguage_tags-76e6eed428a583a8.rlib" "/tmp/codon/tmp/cache/target/release/deps/libtypeable-e833b24097d2df79.rlib" "/tmp/codon/tmp/cache/target/release/deps/libtraitobject-9347322b3a1d51bf.rlib" "/tmp/codon/tmp/cache/target/release/deps/libnum_cpus-1d370d01f26ec5c2.rlib" "/tmp/codon/tmp/cache/target/release/deps/libhttparse-6f0db3eff7258637.rlib" "/tmp/codon/tmp/cache/target/release/deps/libunicase-2a7911adf2b9d806.rlib" "/tmp/codon/tmp/cache/target/release/deps/liburl-b126357f4d0d4ecf.rlib" "/tmp/codon/tmp/cache/target/release/deps/libidna-ee1ff6ebcefa9e2b.rlib" "/tmp/codon/tmp/cache/target/release/deps/libunicode_normalization-815d148452844814.rlib" "/tmp/codon/tmp/cache/target/release/deps/libtinyvec-295d5ad3fc0cbc9c.rlib" "/tmp/codon/tmp/cache/target/release/deps/libtinyvec_macros-7830452eb45edc19.rlib" "/tmp/codon/tmp/cache/target/release/deps/libunicode_bidi-41abae14da234d1b.rlib" "/tmp/codon/tmp/cache/target/release/deps/libmatches-32581ec9f6412ebd.rlib" "/tmp/codon/tmp/cache/target/release/deps/libbase64-e81130a5f1619be7.rlib" "/tmp/codon/tmp/cache/target/release/deps/libsafemem-dff7afbb6aa66a1b.rlib" "/tmp/codon/tmp/cache/target/release/deps/libunicode_xid-caeae2de0f8b5463.rlib" "/tmp/codon/tmp/cache/target/release/deps/libstate-a5c8be246304bd29.rlib" "/tmp/codon/tmp/cache/target/release/deps/libindexmap-1e55b735637bcc6a.rlib" "/tmp/codon/tmp/cache/target/release/deps/libhashbrown-c723dee100e54a5e.rlib" "/tmp/codon/tmp/cache/target/release/deps/libcookie-4b124e3056be9a1b.rlib" "/tmp/codon/tmp/cache/target/release/deps/libhkdf-2560e81ed4cbcd59.rlib" "/tmp/codon/tmp/cache/target/release/deps/libhmac-9d85fffb0d093356.rlib" "/tmp/codon/tmp/cache/target/release/deps/libcrypto_mac-cf605242fc7734e3.rlib" "/tmp/codon/tmp/cache/target/release/deps/libsubtle-44a12f187f6d2fc6.rlib" "/tmp/codon/tmp/cache/target/release/deps/libsha2-a965625e9b4b1d77.rlib" "/tmp/codon/tmp/cache/target/release/deps/libdigest-30da3c50b4689178.rlib" "/tmp/codon/tmp/cache/target/release/deps/libfake_simd-3756b16c63a82254.rlib" "/tmp/codon/tmp/cache/target/release/deps/libblock_buffer-ec72f459c0678688.rlib" "/tmp/codon/tmp/cache/target/release/deps/libblock_padding-2ed51b72affadbdd.rlib" "/tmp/codon/tmp/cache/target/release/deps/libbyte_tools-212432e5188e0eb9.rlib" "/tmp/codon/tmp/cache/target/release/deps/libaes_gcm-c5efb1474636768e.rlib" "/tmp/codon/tmp/cache/target/release/deps/libzeroize-2d4cd4499b23fe5d.rlib" "/tmp/codon/tmp/cache/target/release/deps/libghash-ede53737e70539aa.rlib" "/tmp/codon/tmp/cache/target/release/deps/libpolyval-141b670c6170d563.rlib" "/tmp/codon/tmp/cache/target/release/deps/libuniversal_hash-10f59e96e255cff0.rlib" "/tmp/codon/tmp/cache/target/release/deps/libsubtle-f4e27560cc2cc6cc.rlib" "/tmp/codon/tmp/cache/target/release/deps/libaes-970b959d7ddcb22f.rlib" "/tmp/codon/tmp/cache/target/release/deps/libaes_soft-f4d5f375503c69d8.rlib" "/tmp/codon/tmp/cache/target/release/deps/libopaque_debug-b3511308285898cb.rlib" "/tmp/codon/tmp/cache/target/release/deps/libaead-f00469a5862cc6db.rlib" "/tmp/codon/tmp/cache/target/release/deps/libblock_cipher_trait-38b510971dd0cef9.rlib" "/tmp/codon/tmp/cache/target/release/deps/libgeneric_array-8c74a886c0bfa1b8.rlib" "/tmp/codon/tmp/cache/target/release/deps/libtypenum-8754dce572e25207.rlib" "/tmp/codon/tmp/cache/target/release/deps/libbase64-7ad18e9add804d1e.rlib" "/tmp/codon/tmp/cache/target/release/deps/librand-5028676d61a551aa.rlib" "/tmp/codon/tmp/cache/target/release/deps/librand_chacha-61ee5a941a395a97.rlib" "/tmp/codon/tmp/cache/target/release/deps/libppv_lite86-a6feee9ed6f337c0.rlib" "/tmp/codon/tmp/cache/target/release/deps/librand_core-405e37eb109d2505.rlib" "/tmp/codon/tmp/cache/target/release/deps/libgetrandom-e61e52431766a293.rlib" "/tmp/codon/tmp/cache/target/release/deps/libtime-f621877706c13ab8.rlib" "/tmp/codon/tmp/cache/target/release/deps/libpercent_encoding-a93af9c56752979f.rlib" "/tmp/codon/tmp/cache/target/release/deps/libpercent_encoding-027fc70817b8b184.rlib" "/tmp/codon/tmp/cache/target/release/deps/libpear-c1de2330d615ed19.rlib" "/tmp/codon/tmp/cache/target/release/deps/libdiesel-36fcc1d4d85c33cb.rlib" "/tmp/codon/tmp/cache/target/release/deps/liblibsqlite3_sys-947f19b33c42a82f.rlib" "/tmp/codon/tmp/cache/target/release/deps/libr2d2-9e686ca6dd2cfb64.rlib" "/tmp/codon/tmp/cache/target/release/deps/libscheduled_thread_pool-660da798946ab8fd.rlib" "/tmp/codon/tmp/cache/target/release/deps/libparking_lot-890602ac3a7f5c68.rlib" "/tmp/codon/tmp/cache/target/release/deps/libparking_lot_core-216fb31250c05844.rlib" "/tmp/codon/tmp/cache/target/release/deps/liblibc-5f2395bf90310631.rlib" "/tmp/codon/tmp/cache/target/release/deps/libsmallvec-fe9b70472fb1b09d.rlib" "/tmp/codon/tmp/cache/target/release/deps/liblock_api-46f35b0cc374c311.rlib" "/tmp/codon/tmp/cache/target/release/deps/libscopeguard-680be5d68e26570b.rlib" "/tmp/codon/tmp/cache/target/release/deps/libinstant-1d59ba381bc156aa.rlib" "/tmp/codon/tmp/cache/target/release/deps/libcfg_if-cb3a90c6c918d108.rlib" "/tmp/codon/tmp/cache/target/release/deps/liblog-fe5eb1ec3d35d5a3.rlib" "/tmp/codon/tmp/cache/target/release/deps/libcfg_if-e0361196973a0e81.rlib" "/tmp/codon/tmp/cache/target/release/deps/libbyteorder-696e60eb23609a9a.rlib" "-Wl,--start-group" "/tmp/codon/tmp/cache/multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-25c6acf8063a3802.rlib" "/tmp/codon/tmp/cache/multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-539f13c9442f1597.rlib" "/tmp/codon/tmp/cache/multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libminiz_oxide-37db28e905edb56b.rlib" "/tmp/codon/tmp/cache/multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libadler-9ef2480568df55af.rlib" "/tmp/codon/tmp/cache/multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libobject-1e0f0992cdbecd66.rlib" "/tmp/codon/tmp/cache/multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libaddr2line-6c8e02b8fedc1e5f.rlib" "/tmp/codon/tmp/cache/multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libgimli-807e5ad203594490.rlib" "/tmp/codon/tmp/cache/multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_demangle-083fce1bea11612a.rlib" "/tmp/codon/tmp/cache/multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libhashbrown-1af568081add9042.rlib" "/tmp/codon/tmp/cache/multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_alloc-1395b54a3b3f45bf.rlib" "/tmp/codon/tmp/cache/multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-caba820045f178d5.rlib" "/tmp/codon/tmp/cache/multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcfg_if-512eb53291f6de7e.rlib" "/tmp/codon/tmp/cache/multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-5efacc5025f9f3d8.rlib" "/tmp/codon/tmp/cache/multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-9c4002b5f79ba0e1.rlib" "/tmp/codon/tmp/cache/multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_core-90996f4879673567.rlib" "/tmp/codon/tmp/cache/multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-9ea09a899c3eda46.rlib" "-Wl,--end-group" "/tmp/codon/tmp/cache/multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-ef2408da76957905.rlib" "-Wl,-Bdynamic" "-lssl" "-lcrypto" "-lsqlite3" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc"
= note: /usr/bin/ld: cannot find -lsqlite3
collect2: error: ld returned 1 exit status
error: aborting due to previous error; 9 warnings emitted
error: could not compile `cardbox_api`
Looks like the compiler cannot find lsqlite3? How do I specify the location? How do I even find where lsqlite3 is installed?
As the error message indicates your build system is missing libsqlite3.
There are two ways to solve this problem:
Add libsqlite3-sys = { version = "0.18", features = ["bundled"]} to your Cargo.toml. This instructs the cargo to also build libsqlite3 as part of your application build. The library is statically linked using this method.
Install libsqlite3 on the build system and use the SQLITE3_LIB_DIR environment variable to point the compiler to the correct directory. libsqlite3 will be linked dynamically, which means you also need to provide this library on the system you are running your application afterwards.

Crosstool-ng g++ not compiling c++11 std::current_exception

I build a gcc toolchain using Crosstool-ng, but the resulting g++ does not compile and/or link C++11 exceptions.
If I try to compile:
#include <exception>
int main()
{
std::current_exception();
}
via:
arm-none-linux-gnueabihf-g++ -std=c++11 foo.cpp
I get:
foo.cpp: In function 'int main()':
foo.cpp:5:9: error: 'current_exception' is not a member of 'std'
std::current_exception();
^~~
However, if I additionally provide cortex-a9 as cpu the haviour changes:
arm-none-linux-gnueabihf-g++ -mcpu=cortex-a9 -std=c++11 foo.cpp
results in:
/tmp/cc13AEjE.o: In function `main':
foo.cpp:(.text+0x14): undefined reference to `std::current_exception()'
foo.cpp:(.text+0x20): undefined reference to
`std::__exception_ptr::exception_ptr::~exception_ptr()'
collect2: error: ld returned 1 exit status
I greped within the toolchain for current_exception and it seems good for me:
grep -r -e current_exception arm-none-linux-gnueabihf/
Binary file arm-none-linux-gnueabihf/arm-none-linux-gnueabihf/sysroot/lib/libstdc++.so.6.0.22 matches
Binary file arm-none-linux-gnueabihf/arm-none-linux-gnueabihf/sysroot/lib/libstdc++.a matches
Binary file arm-none-linux-gnueabihf/arm-none-linux-gnueabihf/sysroot/lib/libsupc++.a matches
arm-none-linux-gnueabihf/arm-none-linux-gnueabihf/include/c++/6.3.0/cxxabi.h: __cxa_current_exception_type() _GLIBCXX_NOTHROW __attribute__ ((__pure__));
arm-none-linux-gnueabihf/arm-none-linux-gnueabihf/include/c++/6.3.0/future: (*_M_result)->_M_error = current_exception();
arm-none-linux-gnueabihf/arm-none-linux-gnueabihf/include/c++/6.3.0/future: (*_M_result)->_M_error = current_exception();
arm-none-linux-gnueabihf/arm-none-linux-gnueabihf/include/c++/6.3.0/bits/exception_ptr.h: exception_ptr current_exception() _GLIBCXX_USE_NOEXCEPT;
arm-none-linux-gnueabihf/arm-none-linux-gnueabihf/include/c++/6.3.0/bits/exception_ptr.h: friend exception_ptr std::current_exception() _GLIBCXX_USE_NOEXCEPT;
arm-none-linux-gnueabihf/arm-none-linux-gnueabihf/include/c++/6.3.0/bits/exception_ptr.h: return current_exception();
arm-none-linux-gnueabihf/arm-none-linux- gnueabihf/include/c++/6.3.0/bits/nested_exception.h: nested_exception() noexcept : _M_ptr(current_exception()) { }
The settings I used for Crosstool-ng are:
arm-none-linux-gnueabihf/bin/arm-none-linux-gnueabihf-g++ -v
Using built-in specs.
COLLECT_GCC=x-tools/arm-none-linux-gnueabihf/bin/arm-none-linux-gnueabihf-g++
COLLECT_LTO_WRAPPER=/home/builduser/x-tools/arm-none-linux-gnueabihf/libexec/gcc/arm-none-linux-gnueabihf/6.3.0/lto-wrapper
Target: arm-none-linux-gnueabihf
Configured with: /home/builduser/build/.build/src/gcc-6.3.0/configure
--build=x86_64-build_pc-linux-gnu
--host=x86_64-build_pc-linux-gnu
--target=arm-none-linux-gnueabihf
--prefix=/home/builduser/x-tools/arm-none-linux-gnueabihf
--with-sysroot=/home/builduser/x-tools/arm-none-linux-gnueabihf/arm-none-linux-gnueabihf/sysroot
--enable-languages=c,c++
--with-float=hard
--with-pkgversion='crosstool-NG crosstool-ng-1.23.0'
--disable-sjlj-exceptions
--enable-__cxa_atexit
--disable-libmudflap
--disable-libgomp
--disable-libssp
--disable-libquadmath
--disable-libquadmath-support
--disable-libsanitizer
--disable-libmpx
--with-gmp=/home/builduser/build/.build/arm-none-linux-gnueabihf/buildtools
--with-mpfr=/home/builduser/build/.build/arm-none-linux-gnueabihf/buildtools
--with-mpc=/home/builduser/build/.build/arm-none-linux-gnueabihf/buildtools
--with-isl=/home/builduser/build/.build/arm-none-linux-gnueabihf/buildtools
--disable-lto
--with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++ -lm'
--enable-threads=posix
--enable-target-optspace
--disable-plugin
--disable-nls
--disable-multilib
--with-local-prefix=/home/builduser/x-tools/arm-none-linux-gnueabihf/arm-none-linux-gnueabihf/sysroot
--enable-long-long
Thread model: posix
gcc version 6.3.0 (crosstool-NG crosstool-ng-1.23.0)
Building a std::array example works fine.
EDIT:
If I include the CT_ARCH_CPU="cortex-a9" option to my crostool-ng configuration (which leads to a --with-cpu=cortex-a9 within g++) the std::current_exception example works fine.
So the question is:
Why does the cpu variant the compiler should generate code for and the way the cpu variant is told to the toolchain (-mcpu at runtime vs. inbuild --with-cpu) is influencing the ability to compile/link std::current_exception?

MPFR 3.1.3 fails with "illegal thread local variable reference to regular symbol" on Mac + Intel 15

I downloaded MPFR 3.1.3 from http://www.mpfr.org/mpfr-current/ and attempted to compile with Intel 15 (icc --version returns icc (ICC) 15.0.3 20150408) on Mac Yosemite (10.10.4).
The build fails at this point:
jrhammon-mac01:build jrhammon$ make
Making all in doc
make[1]: Nothing to be done for `all'.
Making all in src
/Applications/Xcode.app/Contents/Developer/usr/bin/make all-am
/bin/sh ../libtool --tag=CC --mode=link icc -Wall -Wmissing-prototypes -Wpointer-arith -fp_port -mp -wd1572 -wd265 -wd186 -wd239 -g -O2 -version-info 5:3:1 -Wl,-search_paths_first -o libmpfr.la -rpath /usr/local/lib exceptions.lo extract.lo uceil_exp2.lo uceil_log2.lo ufloor_log2.lo add.lo add1.lo add_ui.lo agm.lo clear.lo cmp.lo cmp_abs.lo cmp_si.lo cmp_ui.lo comparisons.lo div_2exp.lo div_2si.lo div_2ui.lo div.lo div_ui.lo dump.lo eq.lo exp10.lo exp2.lo exp3.lo exp.lo frac.lo frexp.lo get_d.lo get_exp.lo get_str.lo init.lo inp_str.lo isinteger.lo isinf.lo isnan.lo isnum.lo const_log2.lo log.lo modf.lo mul_2exp.lo mul_2si.lo mul_2ui.lo mul.lo mul_ui.lo neg.lo next.lo out_str.lo printf.lo vasprintf.lo const_pi.lo pow.lo pow_si.lo pow_ui.lo print_raw.lo print_rnd_mode.lo reldiff.lo round_prec.lo set.lo setmax.lo setmin.lo set_d.lo set_dfl_prec.lo set_exp.lo set_rnd.lo set_f.lo set_prc_raw.lo set_prec.lo set_q.lo set_si.lo set_str.lo set_str_raw.lo set_ui.lo set_z.lo sqrt.lo sqrt_ui.lo sub.lo sub1.lo sub_ui.lo rint.lo ui_div.lo ui_sub.lo urandom.lo urandomb.lo get_z_exp.lo swap.lo factorial.lo cosh.lo sinh.lo tanh.lo sinh_cosh.lo acosh.lo asinh.lo atanh.lo atan.lo cmp2.lo exp_2.lo asin.lo const_euler.lo cos.lo sin.lo tan.lo fma.lo fms.lo hypot.lo log1p.lo expm1.lo log2.lo log10.lo ui_pow.lo ui_pow_ui.lo minmax.lo dim.lo signbit.lo copysign.lo setsign.lo gmp_op.lo init2.lo acos.lo sin_cos.lo set_nan.lo set_inf.lo set_zero.lo powerof2.lo gamma.lo set_ld.lo get_ld.lo cbrt.lo volatile.lo fits_sshort.lo fits_sint.lo fits_slong.lo fits_ushort.lo fits_uint.lo fits_ulong.lo fits_uintmax.lo fits_intmax.lo get_si.lo get_ui.lo zeta.lo cmp_d.lo erf.lo inits.lo inits2.lo clears.lo sgn.lo check.lo sub1sp.lo version.lo mpn_exp.lo mpfr-gmp.lo mp_clz_tab.lo sum.lo add1sp.lo free_cache.lo si_op.lo cmp_ld.lo set_ui_2exp.lo set_si_2exp.lo set_uj.lo set_sj.lo get_sj.lo get_uj.lo get_z.lo iszero.lo cache.lo sqr.lo int_ceil_log2.lo isqrt.lo strtofr.lo pow_z.lo logging.lo mulders.lo get_f.lo round_p.lo erfc.lo atan2.lo subnormal.lo const_catalan.lo root.lo sec.lo csc.lo cot.lo eint.lo sech.lo csch.lo coth.lo round_near_x.lo constant.lo abort_prec_max.lo stack_interface.lo lngamma.lo zeta_ui.lo set_d64.lo get_d64.lo jn.lo yn.lo rem1.lo get_patches.lo add_d.lo sub_d.lo d_sub.lo mul_d.lo div_d.lo d_div.lo li2.lo rec_sqrt.lo min_prec.lo buildopt.lo digamma.lo bernoulli.lo isregular.lo set_flt.lo get_flt.lo scale2.lo set_z_exp.lo ai.lo gammaonethird.lo grandom.lo -lgmp
libtool: link: icc -dynamiclib -Wl,-undefined -Wl,dynamic_lookup -o .libs/libmpfr.4.dylib .libs/exceptions.o .libs/extract.o .libs/uceil_exp2.o .libs/uceil_log2.o .libs/ufloor_log2.o .libs/add.o .libs/add1.o .libs/add_ui.o .libs/agm.o .libs/clear.o .libs/cmp.o .libs/cmp_abs.o .libs/cmp_si.o .libs/cmp_ui.o .libs/comparisons.o .libs/div_2exp.o .libs/div_2si.o .libs/div_2ui.o .libs/div.o .libs/div_ui.o .libs/dump.o .libs/eq.o .libs/exp10.o .libs/exp2.o .libs/exp3.o .libs/exp.o .libs/frac.o .libs/frexp.o .libs/get_d.o .libs/get_exp.o .libs/get_str.o .libs/init.o .libs/inp_str.o .libs/isinteger.o .libs/isinf.o .libs/isnan.o .libs/isnum.o .libs/const_log2.o .libs/log.o .libs/modf.o .libs/mul_2exp.o .libs/mul_2si.o .libs/mul_2ui.o .libs/mul.o .libs/mul_ui.o .libs/neg.o .libs/next.o .libs/out_str.o .libs/printf.o .libs/vasprintf.o .libs/const_pi.o .libs/pow.o .libs/pow_si.o .libs/pow_ui.o .libs/print_raw.o .libs/print_rnd_mode.o .libs/reldiff.o .libs/round_prec.o .libs/set.o .libs/setmax.o .libs/setmin.o .libs/set_d.o .libs/set_dfl_prec.o .libs/set_exp.o .libs/set_rnd.o .libs/set_f.o .libs/set_prc_raw.o .libs/set_prec.o .libs/set_q.o .libs/set_si.o .libs/set_str.o .libs/set_str_raw.o .libs/set_ui.o .libs/set_z.o .libs/sqrt.o .libs/sqrt_ui.o .libs/sub.o .libs/sub1.o .libs/sub_ui.o .libs/rint.o .libs/ui_div.o .libs/ui_sub.o .libs/urandom.o .libs/urandomb.o .libs/get_z_exp.o .libs/swap.o .libs/factorial.o .libs/cosh.o .libs/sinh.o .libs/tanh.o .libs/sinh_cosh.o .libs/acosh.o .libs/asinh.o .libs/atanh.o .libs/atan.o .libs/cmp2.o .libs/exp_2.o .libs/asin.o .libs/const_euler.o .libs/cos.o .libs/sin.o .libs/tan.o .libs/fma.o .libs/fms.o .libs/hypot.o .libs/log1p.o .libs/expm1.o .libs/log2.o .libs/log10.o .libs/ui_pow.o .libs/ui_pow_ui.o .libs/minmax.o .libs/dim.o .libs/signbit.o .libs/copysign.o .libs/setsign.o .libs/gmp_op.o .libs/init2.o .libs/acos.o .libs/sin_cos.o .libs/set_nan.o .libs/set_inf.o .libs/set_zero.o .libs/powerof2.o .libs/gamma.o .libs/set_ld.o .libs/get_ld.o .libs/cbrt.o .libs/volatile.o .libs/fits_sshort.o .libs/fits_sint.o .libs/fits_slong.o .libs/fits_ushort.o .libs/fits_uint.o .libs/fits_ulong.o .libs/fits_uintmax.o .libs/fits_intmax.o .libs/get_si.o .libs/get_ui.o .libs/zeta.o .libs/cmp_d.o .libs/erf.o .libs/inits.o .libs/inits2.o .libs/clears.o .libs/sgn.o .libs/check.o .libs/sub1sp.o .libs/version.o .libs/mpn_exp.o .libs/mpfr-gmp.o .libs/mp_clz_tab.o .libs/sum.o .libs/add1sp.o .libs/free_cache.o .libs/si_op.o .libs/cmp_ld.o .libs/set_ui_2exp.o .libs/set_si_2exp.o .libs/set_uj.o .libs/set_sj.o .libs/get_sj.o .libs/get_uj.o .libs/get_z.o .libs/iszero.o .libs/cache.o .libs/sqr.o .libs/int_ceil_log2.o .libs/isqrt.o .libs/strtofr.o .libs/pow_z.o .libs/logging.o .libs/mulders.o .libs/get_f.o .libs/round_p.o .libs/erfc.o .libs/atan2.o .libs/subnormal.o .libs/const_catalan.o .libs/root.o .libs/sec.o .libs/csc.o .libs/cot.o .libs/eint.o .libs/sech.o .libs/csch.o .libs/coth.o .libs/round_near_x.o .libs/constant.o .libs/abort_prec_max.o .libs/stack_interface.o .libs/lngamma.o .libs/zeta_ui.o .libs/set_d64.o .libs/get_d64.o .libs/jn.o .libs/yn.o .libs/rem1.o .libs/get_patches.o .libs/add_d.o .libs/sub_d.o .libs/d_sub.o .libs/mul_d.o .libs/div_d.o .libs/d_div.o .libs/li2.o .libs/rec_sqrt.o .libs/min_prec.o .libs/buildopt.o .libs/digamma.o .libs/bernoulli.o .libs/isregular.o .libs/set_flt.o .libs/get_flt.o .libs/scale2.o .libs/set_z_exp.o .libs/ai.o .libs/gammaonethird.o .libs/grandom.o -lgmp -mp -g -O2 -Wl,-search_paths_first -mp -install_name /usr/local/lib/libmpfr.4.dylib -compatibility_version 6 -current_version 6.3 -Wl,-single_module
icc: command line remark #10148: option '-mp' not supported
icc: command line remark #10148: option '-mp' not supported
ld: illegal thread local variable reference to regular symbol __tls___mpfr_allocate_func for architecture x86_64
make[2]: *** [libmpfr.la] Error 1
make[1]: *** [all] Error 2
make: *** [all-recursive] Error 1
I have never seen this error before. Is it a bug in MPFR, the Intel compiler or the Mac toolchain? I am using the system install of GMP (from Homebrew), which I assume is built with Clang, not Intel. Is there a C ABI incompatibility issue here with TLS?
I found https://github.com/feeley/gambit/issues/109 and https://trac.mpich.org/projects/mpich/ticket/1547, which suggest that it is a Mac issue, but I am able to build with CC=clang so I guess it has something to do with Intel.
I have got MPFR to build in the past with Intel compilers, but (apparently) had to apply this patch: https://github.com/hpcugent/easybuild-easyconfigs/blob/master/easybuild/easyconfigs/m/MPFR/MPFR_ictce_remove-deprecated-mp.patch .
Maybe the warnings you're getting aren't so harmless as they seem.

Compiling libshout using QT/qmake

I'm trying to link my QT application to a DLL (libshout), while building for Windows.
I've added the appropriate lines to my .pro file:
LIBS += -L/local/lib -lmp3lame
LIBS += -L/local/lib -lshout
LIBS += -L/local/lib -logg
LIBS += -L/local/lib -lvorbis
LIBS += -lwsock32
I've also successfully built and installed libshout to /local/lib (I'm using mingw and the gcc-dw2 compiler).
However, qmake fails to link successfully. I've pasted the gcc/make output below. I'm not even sure it's trying to link to the right library (isn't .a/.la a static library?).
I've been tearing my hair out for 3 days over this one so any help appreciated :)
g++-dw2 -c -O2 -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPP
ORT -DQT_DLL -DQT_NO_DEBUG -DQT_WEBKIT_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CO
RE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I'../../Qt/4.6.3/include/QtCore' -I
'../../Qt/4.6.3/include/QtNetwork' -I'../../Qt/4.6.3/include/QtGui' -I'../../Qt/
4.6.3/include/QtWebKit' -I'../../Qt/4.6.3/include' -I'../../Qt/4.6.3/include/Act
iveQt' -I'release' -I'../../Qt/4.6.3/mkspecs/win32-g++' -o release/qrc_resources
.o release/qrc_resources.cpp
g++-dw2 -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo
-reloc -Wl,-s -mthreads -Wl -Wl,-subsystem,windows -o build/release/MyApp.exe ob
ject_script.MyApp.Release -L'c:/Qt/4.6.3/lib' -lmingw32 -lqtmain -L/local/lib -
lmp3lame -L/local/lib -lshout -lwsock32 -lQtWebKit4 -lQtGui4 -lQtNetwork4 -lQtCo
re4
C:/msys/1.0/local/lib/libshout.a(ogg.o): In function `free_codec':
c:\myapp_app\external\libshout-2.2.2\src/ogg.c:188: undefined reference to `ogg_
stream_clear'
C:/msys/1.0/local/lib/libshout.a(ogg.o): In function `close_ogg':
c:\myapp_app\external\libshout-2.2.2\src/ogg.c:144: undefined reference to `ogg_
sync_clear'
C:/msys/1.0/local/lib/libshout.a(ogg.o): In function `send_ogg':
c:\myapp_app\external\libshout-2.2.2\src/ogg.c:90: undefined reference to `ogg_s
ync_buffer'
c:\myapp_app\external\libshout-2.2.2\src/ogg.c:92: undefined reference to `ogg_s
ync_wrote'
c:\myapp_app\external\libshout-2.2.2\src/ogg.c:94: undefined reference to `ogg_s
ync_pageout'
c:\myapp_app\external\libshout-2.2.2\src/ogg.c:95: undefined reference to `ogg_p
age_bos'
C:/msys/1.0/local/lib/libshout.a(ogg.o): In function `open_codec':
c:\myapp_app\external\libshout-2.2.2\src/ogg.c:154: undefined reference to `ogg_
page_serialno'
c:\myapp_app\external\libshout-2.2.2\src/ogg.c:154: undefined reference to `ogg_
stream_init'
c:\myapp_app\external\libshout-2.2.2\src/ogg.c:155: undefined reference to `ogg_
stream_pagein'
c:\myapp_app\external\libshout-2.2.2\src/ogg.c:160: undefined reference to `ogg_
stream_clear'
C:/msys/1.0/local/lib/libshout.a(ogg.o): In function `send_ogg':
c:\myapp_app\external\libshout-2.2.2\src/ogg.c:117: undefined reference to `ogg_
page_serialno'
c:\myapp_app\external\libshout-2.2.2\src/ogg.c:119: undefined reference to `ogg_
stream_pagein'
c:\myapp_app\external\libshout-2.2.2\src/ogg.c:94: undefined reference to `ogg_s
ync_pageout'
C:/msys/1.0/local/lib/libshout.a(ogg.o): In function `shout_open_ogg':
c:\myapp_app\external\libshout-2.2.2\src/ogg.c:74: undefined reference to `ogg_s
ync_init'
C:/msys/1.0/local/lib/libshout.a(vorbis.o): In function `free_vorbis_data':
c:\myapp_app\external\libshout-2.2.2\src/vorbis.c:103: undefined reference to `v
orbis_info_clear'
c:\myapp_app\external\libshout-2.2.2\src/vorbis.c:104: undefined reference to `v
orbis_comment_clear'
C:/msys/1.0/local/lib/libshout.a(vorbis.o): In function `read_vorbis_page':
c:\myapp_app\external\libshout-2.2.2\src/vorbis.c:83: undefined reference to `vo
rbis_synthesis_headerin'
c:\myapp_app\external\libshout-2.2.2\src/vorbis.c:82: undefined reference to `og
g_stream_packetout'
c:\myapp_app\external\libshout-2.2.2\src/vorbis.c:91: undefined reference to `og
g_stream_packetout'
C:/msys/1.0/local/lib/libshout.a(vorbis.o): In function `vorbis_blocksize':
c:\myapp_app\external\libshout-2.2.2\src/vorbis.c:110: undefined reference to `v
orbis_packet_blocksize'
C:/msys/1.0/local/lib/libshout.a(vorbis.o): In function `shout_open_vorbis':
c:\myapp_app\external\libshout-2.2.2\src/vorbis.c:57: undefined reference to `vo
rbis_info_init'
c:\myapp_app\external\libshout-2.2.2\src/vorbis.c:58: undefined reference to `vo
rbis_comment_init'
c:\myapp_app\external\libshout-2.2.2\src/vorbis.c:60: undefined reference to `og
g_stream_packetout'
c:\myapp_app\external\libshout-2.2.2\src/vorbis.c:62: undefined reference to `vo
rbis_synthesis_headerin'
collect2: ld returned 1 exit status
make[1]: *** [build/release/Myapp.exe] Error 1
make[1]: Leaving directory `/c/myapp_app/src'
make: *** [release] Error 2
My first guess would be that libogg and libvorbis aren't installed in /local/lib, did you check that they are there?

Resources