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

Error: version '408*', prefer 'B32*' #922

Closed
georghegel opened this issue May 2, 2024 · 2 comments
Closed

Error: version '408*', prefer 'B32*' #922

georghegel opened this issue May 2, 2024 · 2 comments

Comments

@georghegel
Copy link

Describe the bug
When I'm trying to run gcovr I'm getting this huge message:

(ERROR) GCOV produced the following errors processing /Users/rachelsa/Downloads/matrix_cpp/build/tester/complement.cpp.gcda:
	Trouble processing '/Users/rachelsa/Downloads/matrix_cpp/build/tester/complement.cpp.gcda' with working directory '/Users/rachelsa/Downloads/matrix_cpp/build/tester'.
Stdout of gcov was >>None<< End of stdout
Stderr of gcov was >>None<< End of stderr
Exception was >>[Errno 2] No such file or directory: '/path/to/correct/gcov'<< End of stderr
Current processed gcov file was None.
Use option --verbose to get extended information.
	(gcovr could not infer a working directory that resolved it.)
To ignore this error use option --gcov-ignore-errors=no_working_dir_found.
Traceback (most recent call last):
  File "/opt/goinfre/rachelsa/homebrew/Cellar/gcovr/7.2/libexec/lib/python3.12/site-packages/gcovr/formats/gcov/workers.py", line 80, in worker
    work(*args, **kwargs)
  File "/opt/goinfre/rachelsa/homebrew/Cellar/gcovr/7.2/libexec/lib/python3.12/site-packages/gcovr/formats/gcov/read.py", line 450, in process_datafile
    raise RuntimeError(errors_output)
RuntimeError: GCOV produced the following errors processing /Users/rachelsa/Downloads/matrix_cpp/build/tester/complement.cpp.gcda:
	Trouble processing '/Users/rachelsa/Downloads/matrix_cpp/build/tester/complement.cpp.gcda' with working directory '/Users/rachelsa/Downloads/matrix_cpp/build/tester'.
Stdout of gcov was >>None<< End of stdout
Stderr of gcov was >>None<< End of stderr
Exception was >>[Errno 2] No such file or directory: '/path/to/correct/gcov'<< End of stderr
Current processed gcov file was None.
Use option --verbose to get extended information.
	(gcovr could not infer a working directory that resolved it.)
To ignore this error use option --gcov-ignore-errors=no_working_dir_found.
Traceback (most recent call last):
  File "/opt/goinfre/rachelsa/homebrew/Cellar/gcovr/7.2/libexec/lib/python3.12/site-packages/gcovr/formats/gcov/workers.py", line 80, in worker
    work(*args, **kwargs)
  File "/opt/goinfre/rachelsa/homebrew/Cellar/gcovr/7.2/libexec/lib/python3.12/site-packages/gcovr/formats/gcov/read.py", line 450, in process_datafile
    raise RuntimeError(errors_output)
RuntimeError: GCOV produced the following errors processing /Users/rachelsa/Downloads/matrix_cpp/build/tester/complement.cpp.gcda:
	Trouble processing '/Users/rachelsa/Downloads/matrix_cpp/build/tester/complement.cpp.gcda' with working directory '/Users/rachelsa/Downloads/matrix_cpp/build/tester'.
Stdout of gcov was >>None<< End of stdout
Stderr of gcov was >>None<< End of stderr
Exception was >>[Errno 2] No such file or directory: '/path/to/correct/gcov'<< End of stderr
Current processed gcov file was None.
Use option --verbose to get extended information.
	(gcovr could not infer a working directory that resolved it.)
To ignore this error use option --gcov-ignore-errors=no_working_dir_found.

Manual calling of gcov with flags gives something like that:

GaussElimination.cpp.gcno:version '408*', prefer 'B32*'
GaussElimination.cpp.gcno:no functions found

To Reproduce
Steps to reproduce the behavior:

  1. I have the following CMakeLists.txt file:
cmake_minimum_required(VERSION 3.14)
project(my_project)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_FLAGS --coverage)

include(FetchContent)
FetchContent_Declare(
  googletest
  URL https://github.com/google/googletest/archive/03597a01ee50ed33e9dfd640b249b4be3799d395.zip
)

set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
FetchContent_MakeAvailable(googletest)

enable_testing()

add_executable(
  main
  ./tests/test.cpp
  ./srcs/arithmetic.cpp
  ./srcs/determinant.cpp
  ./srcs/inverse.cpp
  ./srcs/complement.cpp
  ./srcs/transpose.cpp
  ./srcs/operators.cpp
  ./tools/print_matrix.cpp
  ./tools/GaussElimination.cpp
  ./tools/ResizeMatrix.cpp
)
target_link_libraries(
  main
  GTest::gtest_main
)

include(GoogleTest)
gtest_discover_tests(main)
  1. In ./matrix_cpp/ directory I have all of the header and .cpp files
  2. I also have this Makefile to run CMake:
OPS=		./srcs/arithmetic.cpp \
				./srcs/complement.cpp \
				./srcs/determinant.cpp \
				./srcs/inverse.cpp \
				./srcs/transpose.cpp

TOOLS=	./tools/print_matrix.cpp \
				./tools/GaussElimination.cpp \
				./tools/ResizeMatrix.cpp

TESTS=	./tests/test.cpp

SRCS=		$(OPS) $(TOOLS)

OBJS=		$(SRCS:.c=.o)

.PHONY: clean s21_matrix_oop.a gcov_report test
all: clean

test: s21_matrix_oop.a
	@rm -rf build
	@mkdir build
	@cd build && cmake ../ && make && ./main
  1. I run (it passes all my tests and creates build dir where It creates executable and .gcda/.gcno files:
make test
  1. After this command I get an error:
gcovr -r .

Expected behavior
I expected that I'll got coverage - but I've got nothing, but errors.

Desktop (please complete the following information):

  • OS: [macOS Ventura 13.5]
  • GCC version [13.2.0]
  • GCOVR version [7.2]
  • Project directory layout:
    • Main Working Directory: ./matrix_cpp/
    • Executable and gcno/gcda files located in: ./matrix_cpp/build

I would be happy to any help and any links to similar problems, 'cause I didn't find nothing similar.
Thanks! :3

@georghegel georghegel changed the title Same versions of compiler/gcovr/gcov and error: version '408*', prefer 'B32*' Error: version '408*', prefer 'B32*' May 2, 2024
@Spacetown
Copy link
Member

Can you post your command line? The message [Errno 2] No such file or directory: '/path/to/correct/gcov' shows that a wrong gcov tool is configured.

Have you tried the option --verbose?

@Spacetown
Copy link
Member

Closing because of no response.

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

No branches or pull requests

2 participants