mirror of
https://github.com/jmcnamara/libxlsxwriter.git
synced 2026-05-15 14:15:54 -06:00
[GH-ISSUE #116] Issues building libxlswriter on Gentoo Linux with system minizip #96
Labels
No labels
awaiting user feedback
bug
cmake
cmake
docs
feature request
in progress
long term
medium term
medium term
pull-request
question
question
ready to close
short term
under investigation
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/libxlsxwriter#96
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @petricf on GitHub (Aug 10, 2017).
Original GitHub issue: https://github.com/jmcnamara/libxlsxwriter/issues/116
Originally assigned to: @jmcnamara on GitHub.
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
@jmcnamara commented on GitHub (Aug 10, 2017):
Hi @petricf,
Thanks for the report.
John
@petricf commented on GitHub (Aug 10, 2017):
Hello,
imho this is a problem in which the sequence of include directories are scanned for header
files - system vs. packaged.
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).
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’
...
@petricf commented on GitHub (Aug 10, 2017):
Missed attachment - renamed to build.txt
build.txt
@jmcnamara commented on GitHub (Aug 10, 2017):
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).
@petricf commented on GitHub (Aug 10, 2017):
Find attached the screen output (test.txt) as requested.
test.txt
@petricf commented on GitHub (Aug 11, 2017):
Compiler info:
Default include search paths are:
@jmcnamara commented on GitHub (Aug 11, 2017):
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:
/usr/local/include/zconf.h.John
@petricf commented on GitHub (Aug 11, 2017):
This will get you to a non-gui installation. The latest stable version should be ok.
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, ...) ?
@jmcnamara commented on GitHub (Aug 11, 2017):
Virtualbox
@petricf commented on GitHub (Aug 11, 2017):
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.
But this may help: http://www.osboxes.org/gentoo/
@jmcnamara commented on GitHub (Aug 12, 2017):
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
@petricf commented on GitHub (Aug 12, 2017):
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.
You do not have to make a release only driven by the change above.
Could you consider adding a cmake option to use a system wide installed minizip instead of the packaged one ?
@jmcnamara commented on GitHub (Aug 12, 2017):
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:
@jmcnamara commented on GitHub (Aug 12, 2017):
This issue is now fixed on master for cmake and make.
@Alexhuszagh Can you have a quick look at CMake fix:
f256dc2ae9to see if everything looks okay. No rush.@petricf commented on GitHub (Aug 12, 2017):
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.
@jmcnamara commented on GitHub (Aug 12, 2017):
Version 0.7.3 is available now. Thanks for submitting the ebuild file.
@petricf commented on GitHub (Aug 13, 2017):
Confirmed - patches are no more required for Gentoo.
I've posted an updated ebuild to https://bugs.gentoo.org/show_bug.cgi?id=627452.
@jmcnamara commented on GitHub (Aug 14, 2017):
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.