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

First Version (DIN, ISO15118-2 & -20, V2GTP) #2

Merged
merged 1 commit into from
Feb 13, 2024

Conversation

SebaLukas
Copy link
Collaborator

Added generated code from cbexigen, cmakelists.txt and a simple test to test the library

@barsnick
Copy link
Contributor

Interestingly, libcb_v2gtp.so is alledgedly linked statically, when building dynamic libs:

$ cmake .. -DBUILD_SHARED_LIBS=on
...
$ make -j4
...
$ ldd ./build/lib/cbv2g/libcb_v2gtp.so 
	statically linked

It turns out it doesn't need any libc functions, and is therefore not linked against anything at all?

$ objdump -p ./build/lib/cbv2g/libcb_v2gtp.so | grep NEEDED
$

LGTM so far.

I cannot build tests though, some dependency is missing:

$ cmake .. -DBUILD_SHARED_LIBS=on -DCB_V2G_BUILD_TESTS=on
...
$ make
...
Scanning dependencies of target test_app_handshake
[ 99%] Building CXX object tests/app_handshake/CMakeFiles/test_app_handshake.dir/app_handshake.cpp.o
[100%] Linking CXX executable test_app_handshake
/usr/bin/ld: CMakeFiles/test_app_handshake.dir/app_handshake.cpp.o: undefined reference to symbol 'exi_bitstream_init'
/usr/bin/ld: /home/intech/Development/EVerest/libcbv2g/build/lib/cbv2g/libcb_exi_codec.so: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[2]: *** [tests/app_handshake/CMakeFiles/test_app_handshake.dir/build.make:87: tests/app_handshake/test_app_handshake] Error 1
make[1]: *** [CMakeFiles/Makefile2:1175: tests/app_handshake/CMakeFiles/test_app_handshake.dir/all] Error 2
make: *** [Makefile:141: all] Error 2

It does work without -DBUILD_SHARED_LIBS=on (and the test passes).

@barsnick
Copy link
Contributor

make test now works with your latest commit, excellent.

PR LGTM. 👍

@SebaLukas
Copy link
Collaborator Author

First point: That's interesting, on my system libc is used for libcb_v2gtp.so.

objdump -p build/lib/cbv2g/libcb_v2gtp.so | grep NEEDED
  NEEDED               libc.so.6

I use Fedora 39 (make and ninja makes no difference). No idea why this happens.

@SebaLukas SebaLukas force-pushed the feature/adding-first-version branch from 7862957 to df6c648 Compare February 13, 2024 09:17
Added dependencies and getting started to the README.md

Signed-off-by: Sebastian Lukas <[email protected]>
@SebaLukas SebaLukas force-pushed the feature/adding-first-version branch from df6c648 to 45a4740 Compare February 13, 2024 09:21
@SebaLukas SebaLukas merged commit 7647ffe into main Feb 13, 2024
1 check passed
@SebaLukas SebaLukas deleted the feature/adding-first-version branch February 13, 2024 09:23
@barsnick
Copy link
Contributor

I use Fedora 39 (make and ninja makes no difference). No idea why this happens.

I checked this on Ubuntu 20 (linking with cc (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0) and Ubuntu 22 (linking with cc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0).

It doesn't really matter, of course, if it works. Out of pure interest, it would be fun to see the disassembled code(s).

P.S.: Lots of ❤ for Fedora.

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.

2 participants