Open acschick opened 8 years ago
I put argp.h into the fadc src folder and now this is what I get:
1x-nat-vl932-172-30-193-100:src Andrew$ sudo make Password: Compiling shared library... Undefined symbols for architecture x86_64: "_argp_parse", referenced from: _main in fadc-d7dc79.o "_argp_usage", referenced from: parseopt(int, char, argpstate) in fadc-d7dc79.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *\ [libfadc.so] Error 1 1x-nat-vl932-172-30-193-100:src Andrew$ -v -bash: -v: command not found
"Normally this sort of failure happens when compiling your C++ code by invoking the C front-end. The gcc you execute understands and compiles the file as C++, but doesn't link it with the C++ libraries. Example"
OK -- argp is the argument parser library that is used to handle arguments passed to fadc
. argp.h
defines the library's interface, but this error seems to indicate that the actual implementation is not being found by your linker.
I don't think macs come with argp installed by default. In theory I could bundle it into fadc, but I'm not going to bother. Here's what you do:
Vagrantfile
in the repo to start a virtual Ubuntu machine by running vagrant up
from the folder containing the Vagrantfile
.vagrant ssh -- -X
.cd
into it and the code should compile/install correctly.fadc
on the virtual machine just like you normally would. You can exit the virtual machine by running exit
. To shut down the VM, run vagrant halt
.Alternatively, there's a hacky fix for macs here. Your choice
So I just put that in the header file?
I don't understand the language in his post haha.
I get this error in the VM:
vagrant@vagrant-ubuntu-trusty-64:~/fadc-tools/src$ sudo make Compiling shared library... FadcToolsDict.cxx:15:31: fatal error: TDictAttributeMap.h: No such file or directory
do make clean
then make
. I've never seen that error but it's probably an artifact of an incomplete build.
1x-nat-vl932-172-30-193-100:src Andrew$ sudo make Generating ROOT Dictionary file for classes... Warning in cling::IncrementalParser::CheckABICompatibility(): C++ ABI mismatch, compiled with _LIBCPP_VERSION v1101 running with v3700 Done! Compiling shared library... fadc.c:2:10: fatal error: 'argp.h' file not found
include "argp.h"
1 error generated. make: *\ [libfadc.so] Error 1
I can get argp.h from Matt's computer but on his Windows it's in his usr/include folder. I was wondering where it ought to be for a linux system.