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

"make test" fails if "make install" is not done #204

Open
sudipm-mukherjee opened this issue Dec 13, 2023 · 4 comments
Open

"make test" fails if "make install" is not done #204

sudipm-mukherjee opened this issue Dec 13, 2023 · 4 comments

Comments

@sudipm-mukherjee
Copy link

As part of make test, its trying to find codes in /usr/local/lib/sail/codecs but if make test is done before make install then the codecs are not found and the test fails.

SAIL: [D] [context_private.c:781] Initialized in 0 ms.
Error: /build/sail.n/tests/bindings/c++/load_options.cpp:45: assertion failed: codecs.size() > 0U
Error: child killed by signal 6 (Aborted)
/bindings/c++/load-options/copy      [ ERROR ]
SAIL: [D] [context_private.c:58] Allocated new global context mutex
SAIL: [D] [context_private.c:206] Allocated new context 0x55b5f205e6e0
SAIL: [I] [context_private.c:710] Version: 0.9.0
SAIL: [I] [context_private.c:715] Build type: Standalone
SAIL: [I] [context_private.c:721] Static build: no
SAIL: [I] [context_private.c:727] Combine codecs: no
SAIL: [I] [context_private.c:731] Thread-safe: yes
SAIL: [I] [context_private.c:737] SAIL_THIRD_PARTY_CODECS_PATH: enabled
SAIL: [D] [context_private.c:663] SAIL_CODECS_PATH environment variable is not set. Loading codecs from '/usr/local/lib/sail/codecs'
SAIL: [D] [context_private.c:164] SAIL_THIRD_PARTY_CODECS_PATH environment variable is not set. Not loading codecs from it
SAIL: [D] [context_private.c:352] Optional LIB directory '/usr/local/lib/sail/codecs/lib' doesn't exist, so not updating LD_LIBRARY_PATH with it
SAIL: [D] [context_private.c:462] Enumerating codecs in '/usr/local/lib/sail/codecs'
SAIL: [E] [context_private.c:518] Failed to list files in '/usr/local/lib/sail/codecs': No such file or directory
SAIL: [E] [context_private.c:705] 

*** No codecs were found. You could try the following:                       ***
*** - Inspect the error messages printed in stderr.                          ***
*** - Check the installation directory.                                      ***

Steps to reproduce:

  1. cmake -DSAIL_BUILD_APPS=OFF -DSAIL_BUILD_EXAMPLES=OFF
  2. make
  3. make test
@HappySeaFox
Copy link
Owner

HappySeaFox commented Dec 14, 2023 via email

@sudipm-mukherjee
Copy link
Author

Few points:

  1. That is not how the Debian or Ubuntu official builds works. Official builds will use sbuild to build. sbuild will never install the built package and will run make test immediately after building it.
  2. /usr/local/lib will never be the installation path for an offical Debian package. FSF says: The /usr/local hierarchy is for use by the system administrator when installing software locally.

Anyways, I have now disabled running make test, so this is not a blocker at the moment. But it will be good to have it fixed so that make test can be run as part of the build.

Also, fyi (not related to this issue) - I have excluded the debian folder while importing the source and have almost rewritten it. Only taken the library names and part of description.

@HappySeaFox
Copy link
Owner

For (2) the path is not hardcoded and is configurable with CMAKE_INSTALL_PREFIX, so it's totally possible to install into /usr/lib which is done by default in sbuild I guess.

@HappySeaFox
Copy link
Owner

HappySeaFox commented Dec 14, 2023

For (1) as a workaround it's possible to combine codecs into a single library with -DSAIL_COMBINE_CODECS=ON. This way I guess the tests can be executed without installation. However I would prefer having separate codecs for engineering purposes. It's not a blocker, but some nice thing to have. It's faster to load or unload codecs when they're separate. When they're combined, we lose some engineering control over them.

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