Skip to content

Conversation

@brianmcgillion
Copy link

@brianmcgillion brianmcgillion commented Feb 10, 2025

On systems that prefer absolute paths there is a mixing and matching of
the relative and absolute paths that can result in the below creation of
libdir having the prefix and the full path appended to it.

as seen in this extract from

${prefix}/lib/pkgconfig/snort.pc

prefix=/nix/store/3npvhj5wfwhc0q42qwiinj64bzfb1vvz-snort-3.6.3.0
exec_prefix=${prefix}
bindir=${exec_prefix}/bin
**libdir=${prefix}//nix/store/3npvhj5wfwhc0q42qwiinj64bzfb1vvz-snort-3.6.3.0/lib**
includedir=${prefix}/include
datarootdir=${prefix}/share
datadir=${datarootdir}
mandir=${datarootdir}/man
infodir=${datarootdir}/info

In order to preserve backwards compatibility we will use the cmake
fullpath option ${CMAKE_INSTALL_FULL_LIBDIR} in place of
${prefix}/${CMAKE_INSTALL_LIBDIR} which will support both contexts.

This is discussed in the following issue tracker for NixOS NixOS/nixpkgs#144170

also added a missing dependency to the README.

on systems that prefer absolute paths there is a mixing and matching of
the relative and absolute paths that can result in the below creation of
libdir having the prefix and the full path appended to it.

** added to highlight

``prefix=/nix/store/3npvhj5wfwhc0q42qwiinj64bzfb1vvz-snort-3.6.3.0
exec_prefix=${prefix}
bindir=${exec_prefix}/bin
**libdir=${prefix}//nix/store/3npvhj5wfwhc0q42qwiinj64bzfb1vvz-snort-3.6.3.0/lib**
includedir=${prefix}/include
datarootdir=${prefix}/share
datadir=${datarootdir}
mandir=${datarootdir}/man
infodir=${datarootdir}/info
``

In order to preserve backwards compatibility we will use the cmake
fullpath option ${CMAKE_INSTALL_FULL_LIBDIR} in place of
${prefix}/${CMAKE_INSTALL_LIBDIR} which will support both contexts.

Signed-off-by: Brian McGillion <bmg.avoin@gmail.com>
LZMA was missing from the list of dependencies. This is now generally
satisfied by the inclusion of the xz library from https://tukaani.org/xz/.

Signed-off-by: Brian McGillion <bmg.avoin@gmail.com>
@InverseRE
Copy link

Thanks. We will take a look.

@matirko
Copy link
Contributor

matirko commented Dec 10, 2025

This fix (with a minor change) will be included in the next release

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