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

Improve Mac Setup procedure #133

Open
fabiolnm opened this issue Apr 18, 2024 · 0 comments
Open

Improve Mac Setup procedure #133

fabiolnm opened this issue Apr 18, 2024 · 0 comments
Assignees

Comments

@fabiolnm
Copy link

fabiolnm commented Apr 18, 2024

Documentation

This section should have a direct link to https://everest.github.io/nightly/tutorials/how_to_mac/index.html

Simplify "9.3. How To: Develop on a Mac"

It's only necessary to clone the repository and use Cmd+Shift+P to open the everest-playground using the DevContainer.

git clone [email protected]:EVerest/everest-utils.git

followed by the DevContainer instructions screenshot that visually shows to the onboarding developer which playground directory to choose.

Missing libcap dependency

After DevContainer is started and . init.sh is executed:

--   No package 'libcap' found
CMake Error at /usr/share/cmake-3.18/Modules/FindPkgConfig.cmake:545 (message):
  A required package was not found

Solution

Append libcap-dev after

libocpp compilation error

There's a compilation error caused by a const keyword at

https://github.com/EVerest/libocpp/blob/cc169bed941a2c2c4d4e45c066b1ee0675c52cc2/lib/ocpp/common/websocket/websocket_libwebsockets.cpp#L154

[ 43%] Building CXX object _deps/libocpp-build/lib/CMakeFiles/ocpp.dir/ocpp/common/websocket/websocket_libwebsockets.cpp.o
/workspace/everest-cpp/libocpp/lib/ocpp/common/websocket/websocket_libwebsockets.cpp: In function 'bool ocpp::verify_csms_cn(const string&, bool, const X509_STORE_CTX*, bool)':
/workspace/everest-cpp/libocpp/lib/ocpp/common/websocket/websocket_libwebsockets.cpp:162:48: error: invalid conversion from 'const X509_STORE_CTX*' {aka 'const x509_store_ctx_st*'} to 'X509_STORE_CTX*' {aka 'x509_store_ctx_st*'} [-fpermissive]
  162 |     int depth = X509_STORE_CTX_get_error_depth(ctx);
      |                                                ^~~
      |                                                |
      |                                                const X509_STORE_CTX* {aka const x509_store_ctx_st*}
In file included from /usr/include/openssl/x509.h:320,

Solution

Removing the const keyword is enough to fix the compilation.

libsql linking error

/usr/bin/ld: ../_deps/sqlite_cpp-build/sqlite3/libsqlite3.a(sqlite3.c.o): undefined reference to symbol 'dlsym@@GLIBC_2.17'
/usr/bin/ld: /lib/aarch64-linux-gnu/libdl.so.2: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[2]: *** [modules/CMakeFiles/PersistentStore.dir/build.make:153: modules/PersistentStore/PersistentStore] Error 1
make[1]: *** [CMakeFiles/Makefile2:6152: modules/CMakeFiles/PersistentStore.dir/all] Error 2
make: *** [Makefile:171: all] Error 2

Solution

Referencing EVerest/libcbv2g#2 (comment)

cmake .. -DBUILD_SHARED_LIBS=on && make install 

This can be added to init.sh

...
- echo "cmake .. && make install -j$(nproc)"
+ echo "cmake .. -DBUILD_SHARED_LIBS=on && make install -j$(nproc)"

SIL simulation: error while loading shared libraries

it was needed to define LD_LIBRARY_PATH:

export LD_LIBRARY_PATH=./_deps/liblog-build/lib:./_deps/nlohmann_json_schema_validator-build:./_deps/libevse-security-build/lib/evse_security
./dist/bin/manager --config ../config/config-sil-dc.yaml 
fabiolnm added a commit to fabiolnm/everest-utils that referenced this issue Apr 19, 2024
@fabiolnm fabiolnm changed the title Errors setting up on Mac Improve Mac Setup procedure Apr 20, 2024
@krealyt krealyt self-assigned this May 6, 2024
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

No branches or pull requests

2 participants