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
liobjc2 does not detect C++ runtine on NetBSD #203
Comments
What does NetBSD install? If it doesn't install a separate .so for the C++ runtime then this is the correct behaviour (to link the C++ standard library instead). |
If it is the correct behaviour, fine. libobjc2 actually compiles this is what ldd shows:
It should also answer your question, it uses
It appears the only available as shared object, since |
It would be helpful if you could list the tests that aren't failing, their output, and your full CMake invocation. The linkage for libobjc2.so looks correct but 116 failing tests is surprising. |
If I manually run the first 4 tests I see:
However, compare the result of ldd:
wrong number of segments doesn't look promising. I checked that for other tests... apparently the legacy versions are fine, the other versions give this ldd issue. I invoke cmake with only your suggested parameters of setting -DCMAKE_C_COMPILER=clang CMAKE_CXX_FLAGS -march=i686 so to avoid issues withlinking with libatomic. |
This looks like it's caused by bugs in NetBSD's run-time linker. Most of these tests don't generate any output, but if you run them in a debugger then you may find something interesting. |
Some tests run in the debugger show absolutely nothing, however, this one looks bad
|
This is crashing trying to understand the C++ exception layout, which happens the first time that an exception is thrown. For some reason, NetBSD's layout doesn't correspond to anything that we test. This abort is assert failure so you could look at the code in test_eh_personality and try to fix it. I don't know what NetBSD is doing that's odd here - the code works with multiple versions of libcxxrt, libsupc++ and libc++abi, on FreeBSD and Linux, so I've no idea what NetBSD is doing. Note: It's probably easier to debug if you do a debug build. |
Any specific details you would like to be printed out? |
It's crashing here. It's failing to find the exception object in the thrown exception. If you poke memory around there, you may be able to find what needs to be changed for NetBSD. |
Well I don't know what I should do with "poke memory around there", I tried to inspet the exception class:
I tried to print out the value and maybe "poke" by changing the -52, but I can't:
I tried this:
Looks almost as if it is off-by-one? I don't know exactly what to look for, but 51 has data. |
Can you also print the expected value? I can't tell if any of the dumped values are the right one. |
Where is the expected value? From the code it looks like searching for 1. Please tell me which variable to printout or how to print you the expected value.
|
Please let me know if the above is useful or how to print the expected value you need. |
It's looking for the offset of the refcount, so it expects to find a value of 1 somewhere. I don't know why it isn't in any of the expected places with NetBSD, you'll have to look at the source code for the NetBSD C++ runtime and try to find where it puts it in the |
I found a reference of the |
Yes, this is on a 32bit platform. |
If I run cmake without sourcing GNUstep.sh first (=gnustep config not found)
then I get:
CXX_RUNTIME_LIB CXX_RUNTIME_LIB-NOTFOUND
The text was updated successfully, but these errors were encountered: