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

CxxParser compile fixes for linux etc #3370

Merged
merged 1 commit into from
May 31, 2024

Conversation

UffeJakobsen
Copy link
Contributor

No description provided.

@Jarod42
Copy link
Contributor

Jarod42 commented May 24, 2024

What is missing from CI to spot the issue?
(I don't have nix/apple to test locally :-/ so sorry for the break).

@UffeJakobsen
Copy link
Contributor Author

What is missing from CI to spot the issue? (I don't have nix/apple to test locally :-/ so sorry for the break).

I'm using Archlinux - so I guess that I have newer GCC and Clang - it can be reproduced with both - see below

-- The C compiler identification is GNU 14.1.1
-- The CXX compiler identification is GNU 14.1.1
....
/usr/bin/ld: lib/liblibCxxParser.a(cpp_func_parser.cpp.o): warning: relocation against `vtable for clFunction' in read-only section `.text._ZN10clFunctionC2ERKS_[clFunction::clFunction(clFunction const&)]'
/usr/bin/ld: lib/liblibCxxParser.a(cpp.cpp.o): relocation R_X86_64_PC32 against symbol `cl_scope_in' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
-- The C compiler identification is Clang 17.0.6
-- The CXX compiler identification is Clang 17.0.6
....
/usr/bin/ld: lib/liblibCxxParser.a(cpp.cpp.o): warning: relocation against `cl_scope_lineno' in read-only section `.text'
/usr/bin/ld: lib/liblibCxxParser.a(cpp.cpp.o): relocation R_X86_64_PC32 against symbol `cl_scope_in' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: bad value
clang++: error: linker command failed with exit code 1 (use -v to see invocation)

Both compilers use GNU ld (GNU Binutils) 2.42.0

@Jarod42
Copy link
Contributor

Jarod42 commented May 28, 2024

Add the equivalent fix for GdbParser part in #3372

@eranif eranif merged commit e270963 into eranif:master May 31, 2024
3 checks passed
@UffeJakobsen UffeJakobsen deleted the master_uj_cxxparser_cmake_fix branch June 2, 2024 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants