cpp-coveralls
cpp-coveralls copied to clipboard
Git submodules breaks this
Please see https://travis-ci.org/luke-jr/bfgminer/jobs/35702927
It seems to be putting the relative path twice.
Hi, @luke-jr Thanks for reporting this. I will looking into this soon.
“soon” :trollface:
Soon would be nice, also hitting this problem
@ariscop sorry for late. Kinda forget this issue.
Could you give me some details about how you encounter the issue?
Traceback (most recent call last):
File "/home/andrew/.local/bin/coveralls", line 9, in <module>
load_entry_point('cpp-coveralls==0.3.9', 'console_scripts', 'coveralls')()
File "/home/andrew/.local/lib/python3.4/site-packages/cpp_coveralls/__init__.py", line 96, in run
cov_report = coverage.collect(args)
File "/home/andrew/.local/lib/python3.4/site-packages/cpp_coveralls/coverage.py", line 375, in collect
with io.open(source_file_path, mode='rb') as src_file:
FileNotFoundError: [Errno 2] No such file or directory: '/home/andrew/Software/elemental-ircd/libratbox/src/netio/netio/epoll.c'
I believe this is actually the result of using automakes subdir-objects option, it happens for every source file a directory below its makefile
The path in epoll.o is netio/epoll.c, so compiler is being run from the makefiles directory
@ariscop could you mind take a look of https://github.com/eddyxu/cpp-coveralls/tree/subproj ?
I am not sure how to reproduce the problem. Could you give some hints?
This change here demonstrates the issue https://github.com/ariscop/cpp-coveralls/commit/3a0f2109770231539df7f1419f5056b527bf9ab6
I believe it is the same bug @luke-jr had, and doesn't have anything to do with subprojects
I don't think @ariscop's problem is remotely related to this. See http://github.com/luke-jr/bfgminer for an example
I suspect it is, your makefile is in ccan.bfg/, but the source files in ccan-upstream/. it's searching for ../ccan-upstream/ccan/opt/opt.c with a working dir of ccan-upstream/ccan/opt/
IOError: [Errno 2] No such file or directory: '/home/travis/build/luke-jr/bfgminer/ccan-upstream/ccan/ccan-upstream/ccan/opt/opt.c'
But the compilers working dir during the build was ccan.bfg/
Oh, hm. I missed that, and assumed it simply failed to clone ccan-upstream...
it is difficult than I thought. There are so many ways you can set the the relative paths between files...
Could you give some suguesstions?
There does seem to be a source dir in objects (as can be seen via strings), i'll see how gdb finds sources, it handles this case
From an objects debug information, joining the DW_AT_comp_dir and DW_AT_name tags give you an absolute source path. readelf --debug-dump will dump those, there's a library called pyelftools with a dwarf parser but i've never used it
I have the same problem. Someone already got run?