-
-
Notifications
You must be signed in to change notification settings - Fork 332
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
Issues building libxlswriter on Gentoo Linux with system minizip #116
Comments
Hi @petricf, Thanks for the report.
John |
Hello,
imho this is a problem in which the sequence of include directories are scanned for header
files - system vs. packaged.
1. How ro replicate.
Gentoo uses a *.ebuild file contining instructions on how to build integrate a package into
the system. Mine reads this way w/o patches):
----------------- cut ----------------------
EAPI=5
*inherit* cmake-utils
DESCRIPTION=*"An C implementation of an excel writer"*
HOMEPAGE=*"https://github.com/jmcnamara/libxlsxwriter"*
SRC_URI=*"https://github.com/jmcnamara/${PN}/archive/RELEASE_${PV}.tar.gz ->
${P}.tar.gz"*
LICENSE=*"BSD-2"* # FreeBSD
SLOT=*"0"*
KEYWORDS=*"amd64 x86"*
RDEPEND=*"sys-libs/zlib[minizip]"*
DEPEND=*"${RDEPEND}"*
S=*"${WORKDIR}/${PN}-RELEASE_${PV}"*
----------------- cut ----------------------
All the build and install rules a built in. This is referred by the second line "inherit cmake-
utils". I do not know what sequence of commands are executed here.
Simply place the file above as "libxlsxwriter-0.7.2.ebuild" into the (local) portage tree of
gentoo. The output can be viewed in the attached file "build.log" (sorry, it's german and
colored/escape codes).
2. Use pre-packaged Makefile.
The output rather is the same
----------------- cut ----------------------
*petric@main ~/libxlsxwriter-RELEASE_0.7.2 $* LANG=en_US.UTF-8 make
*ioapi.c:29:0*:
*ioapi.h:135:51:* *error: *expected ‘*=*’, ‘*,*’, ‘*;*’, ‘*asm*’ or ‘*__attribute__*’ before
‘*OF*’
* ^*
*ioapi.h:136:51:* *error: *expected ‘*=*’, ‘*,*’, ‘*;*’, ‘*asm*’ or ‘*__attribute__*’ before
‘*OF*’
* ^*
*ioapi.h:137:51:* *error: *expected ‘*=*’, ‘*,*’, ‘*;*’, ‘*asm*’ or ‘*__attribute__*’ before
‘*OF*’
* ^*
*ioapi.h:138:51:* *error: *expected ‘*=*’, ‘*,*’, ‘*;*’, ‘*asm*’ or ‘*__attribute__*’ before
‘*OF*’
...
|
Missed attachment - renamed to build.txt |
What is the output of the following on your system:
P.S. Could you post the output via the GitHub website (rather than email) and place it between verbatim commands ``` (3 backticks at the start and end). |
Find attached the screen output (test.txt) as requested. |
Compiler info:
Default include search paths are:
|
I'm finding it very hard to reproduce this on other Linux systems even after installing minizip into the system. From a bit of googling it looks like it only occurs on Gentoo. A couple of questions:
John |
Gentoo is a distribution where you compile (nearly) everything from source. It uses a ports like system (inspired from BSD ?) to manage the installed packages. Which VM system you intend to use (VMware, Proxmox (linux kvm), VirtualBox, ...) ? |
Virtualbox |
Should be installable w/o a problem. I use proxmox (http://pve.proxmox.com) for my test installations - so i can't provide a VM directly. |
Hi, I got a Gentoo VM built and I was able to replicate the issue. It is in the category best described as "interesting". It turns out that it is caused by Gentoo redefining a macro in libs zconf.h. Because why not fix a "bad" macro name and let some poor schmucks downstream tear their hair out for a day or two. Anyway, I've pushed a fix to master and tested it on Gentoo with the standard (non cmake) make system. Let me know if you have any issues and if you want it packaged into a release. The cmake solution will have to be patched separately and probably not in the short term. John |
Thanks for your efforts. I can confirm that your fix works for the Makefile based build. The patches i posted on top of this issue also works for me. I can live with that. Could you consider adding a cmake option to use a system wide installed minizip instead of the packaged one ? |
Ok. I thought that maybe your were going to submit a port/ebuild for libxlsxwriter to Gentoo. If not I'll just let the change trickle into the next release.
To be clear: the issues isn't that there is a system wide minizip since that isn't an issue on Ubuntu, Fedora or other systems. The issue is that the Gentoo maintainers patch the standard zlib/zconf headers to redefine a macro name that they don't like. This causes programs that use those macros to not compile. I'll look into a fix in the CMake files. In the meantime you can build with CMake as follows:
|
This issue is now fixed on master for cmake and make. @Alexhuszagh Can you have a quick look at CMake fix: f256dc2 to see if everything looks okay. No rush. |
I've added the ebuild for 0.7.2 to gentoo bugtracker: https://bugs.gentoo.org/show_bug.cgi?id=627452 This ebuild-version includes the two patches i created for using the system minizip. They will be applied during the build process. As soon as 0.7.3 (or whatever version the fixed release gets) is out (and i get knowledge of it) i will update the ebuild for gentoo and remove the patches. |
Version 0.7.3 is available now. Thanks for submitting the ebuild file. |
Confirmed - patches are no more required for Gentoo. I've posted an updated ebuild to https://bugs.gentoo.org/show_bug.cgi?id=627452. |
Thanks for that. Let me know if it gets added. P.S. There is a feature request to use system minizip when possible, that you might be interested in. See: #119. |
On Gentoo Linux minizip is usually installed system wide. This conflicts with the packaged minizip.
The following patches remove the dependency in CMakeLists.txt and adjust the include in packager.h
They are based on the 0.7.2 release.
My suggestion is to add an option for cmake to use the system minizip instead of the built in one.
Sorry - i don't know much on cmake, so maybe an other one will step in.
patches.zip
The text was updated successfully, but these errors were encountered: