View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000127 | file | General | public | 2019-12-21 08:31 | 2019-12-24 17:41 |
Reporter | pierre | Assigned To | christos | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | feedback | Resolution | open | ||
Platform | Linux from scratch | OS | GNU/Linux | ||
Product Version | 5.38 | ||||
Summary | 0000127: Problems building when only a static libbz2 is installed | ||||
Description | There are two issues actually, the second one I think can be easily fixed: 1. When building file in chapter 5 of LFS (http://www.linuxfromscratch.org/lfs/view/development/), there is only libbz2.a available. This leads to an error when linking libmagic, since it tries to link a shared library with a static one. This can be worked around in two ways (either --disable-bzlib, or --disable-shared --enable-static), but maybe there could be a check somewhere to rpevent this from happening. 2. Now, when building in chapter 6, the libbz2 library is not found by configure, but the bzip.h header is found. This leads correctly to /* #undef BZLIBSUPPORT */ and #define HAVE_BZLIB_H 1 in config.h. But then, src/compress.c has: #if defined(HAVE_BZLIB_H) || defined(BZLIBSUPPORT) #define BUILTIN_BZLIB #include <bzlib.h> #endif then #ifdef BUILTIN_BZLIB private int uncompressbzlib(const unsigned char *, unsigned char **, size_t, size_t *); #endif so that BZ2_bzDecompressInit is called, and leads to undefined symbols... | ||||
Steps To Reproduce | Remove libbz2.so - > first issue Remove libbz2.* and keep /usr/include/bzip.h -> second issue | ||||
Additional Information | I guess the second issue is because the stanza in compress.c should be: #if defined(HAVE_BZLIB_H) && defined(BZLIBSUPPORT) #define BUILTIN_BZLIB #include <bzlib.h> #endif (change || to &&, as is done with zlib). Note that I think there is the same issue with xz, but I have not tested. | ||||
Tags | compression | ||||
|
I fixed the ifdef's but I don't see an easy way to check for shared libraries in autoconf: https://www.gnu.org/software/gnulib/manual/html_node/Searching-for-Libraries.html |
Date Modified | Username | Field | Change |
---|---|---|---|
2019-12-21 08:31 | pierre | New Issue | |
2019-12-21 08:31 | pierre | Tag Attached: compression | |
2019-12-24 17:37 | christos | Assigned To | => christos |
2019-12-24 17:37 | christos | Status | new => assigned |
2019-12-24 17:41 | christos | Status | assigned => feedback |
2019-12-24 17:41 | christos | Note Added: 0003340 |