CMake build problems with expat 2.1.0 and a patch to fix them
Christoph Thompson <[email protected]> Thu, 24 Jan 2013 05:32:15 +0100
| Newsgroups | gmane.text.xml.expat.bugs |
|---|---|
| Message-ID | <CA+7ShCphjVJnRvCZK7p2ZSaD_SoHBipr3C0ibSuzHXAGi_FScg@mail.gmail.com> |
--f46d042a0d619e332604d4014b97
Content-Type: multipart/alternative; boundary=f46d042a0d619e331204d4014b95
--f46d042a0d619e331204d4014b95
Content-Type: text/plain; charset=ISO-8859-1
Hi,
I ran into the following problems while trying to build expat 2.1.0 with
CMake:
* I couldn't set the directories for man pages and libraries. Some Linux
distros such as
Slackware put the man pages in /usr/man instead of /usr/share/man and on
x86_64
libs go into /usr/lib64. It's useful when you can override the defaults
from the command
line like:
cmake -DMAN_INSTALL_DIR=PATH:"/usr/man" -DLIB_INSTALL_DIR=PATH:"/usr/lib64"
So I made all this configurable instead of being hardcoded.
* The pkgconfig file was not generated correctly for /usr/lib64 since it
was hardcoding /usr/lib.
Also it's nice when you can set the include dir so you can put the headers
in /usr/include/expat for example. The exec_prefix is not 'bin', I don't
know what it's used for, but all .pc files I have ever seen just set it to
${prefix}. So it seems safe to do that here too.
* xmlwf couldn't be built because the compiler couldn't write the xmlwf
executable at the root
of the source because there was already a directory named xmlwf. The
solution to that was to
make another CMakeLists.txt inside the xmlwf directory with the part about
building it.
* The expat shared library wasn't built with the usual sonames. So I fixed
that too.
I hope you will find my patch helpful.
Regards,
C. Thompson
--f46d042a0d619e331204d4014b95
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><span style=3D"font-family:arial,sans-serif;font-size:13px=
">Hi,</span><div style=3D"font-family:arial,sans-serif;font-size:13px"><br>=
</div><div style=3D"font-family:arial,sans-serif;font-size:13px">I ran into=
the following problems while trying to build expat 2.1.0 with CMake:</div>
<div style=3D"font-family:arial,sans-serif;font-size:13px"><br></div><div s=
tyle=3D"font-family:arial,sans-serif;font-size:13px">* I couldn't set t=
he directories for man pages and libraries. Some Linux distros such as</div=
>
<div style=3D"font-family:arial,sans-serif;font-size:13px">Slackware put th=
e man pages in /usr/man instead of /usr/share/man and on x86_64</div><div s=
tyle=3D"font-family:arial,sans-serif;font-size:13px">libs go into /usr/lib6=
4. It's useful when you can override the defaults from the command</div=
>
<div style=3D"font-family:arial,sans-serif;font-size:13px">line like:</div>=
<div style=3D"font-family:arial,sans-serif;font-size:13px"><br></div><div s=
tyle=3D"font-family:arial,sans-serif;font-size:13px">cmake -DMAN_INSTALL_DI=
R=3DPATH:"/usr/man" -DLIB_INSTALL_DIR=3DPATH:"/usr/lib64&quo=
t;</div>
<div style=3D"font-family:arial,sans-serif;font-size:13px"><br></div><div s=
tyle=3D"font-family:arial,sans-serif;font-size:13px">So I made all this con=
figurable instead of being hardcoded.</div><div style=3D"font-family:arial,=
sans-serif;font-size:13px">
<br></div><div style=3D"font-family:arial,sans-serif;font-size:13px">* The =
pkgconfig file was not generated correctly for /usr/lib64 since it was hard=
coding /usr/lib.</div><div style=3D"font-family:arial,sans-serif;font-size:=
13px">
Also it's nice when you can set the include dir so you can put the head=
ers in /usr/include/expat for example. The exec_prefix is not 'bin'=
, I don't know what it's used for, but all .pc files I have ever se=
en just set it to ${prefix}. So it seems safe to do that here too.</div>
<div style=3D"font-family:arial,sans-serif;font-size:13px"><br></div><div s=
tyle=3D"font-family:arial,sans-serif;font-size:13px">* xmlwf couldn't b=
e built because the compiler couldn't write the xmlwf executable at the=
root</div>
<div style=3D"font-family:arial,sans-serif;font-size:13px">of the source be=
cause there was already a directory named xmlwf. The solution to that was t=
o</div><div style=3D"font-family:arial,sans-serif;font-size:13px">make anot=
her CMakeLists.txt inside the xmlwf directory with the part about building =
it.</div>
<div style=3D"font-family:arial,sans-serif;font-size:13px"><br></div><div s=
tyle=3D"font-family:arial,sans-serif;font-size:13px">* The expat shared lib=
rary wasn't built with the usual sonames. So I fixed that too.</div><di=
v style=3D"font-family:arial,sans-serif;font-size:13px">
<br></div><div style=3D"font-family:arial,sans-serif;font-size:13px">I hope=
you will find my patch helpful.</div><div style=3D"font-family:arial,sans-=
serif;font-size:13px"><br></div><div style=3D"font-family:arial,sans-serif;=
font-size:13px">
Regards,<br><br>C. Thompson</div></div>
--f46d042a0d619e331204d4014b95--
--f46d042a0d619e332604d4014b97
Content-Type: application/octet-stream; name="expat-2.1.0-cmakefixes.patch"
Content-Disposition: attachment; filename="expat-2.1.0-cmakefixes.patch"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_hcbemf2w0
ZGlmZiAtciAtdSAtTiBleHBhdC0yLjEuMC9DTWFrZUxpc3RzLnR4dCBleHBhdC0yLjEuMC1jbWFr
ZWZpeGVzL0NNYWtlTGlzdHMudHh0Ci0tLSBleHBhdC0yLjEuMC9DTWFrZUxpc3RzLnR4dAkyMDEy
LTAzLTA1IDE1OjM4OjIyLjAwMDAwMDAwMCArMDEwMAorKysgZXhwYXQtMi4xLjAtY21ha2VmaXhl
cy9DTWFrZUxpc3RzLnR4dAkyMDEzLTAxLTI0IDA1OjAwOjU3LjY3NDAwNTQ3NCArMDEwMApAQCAt
MTAsNiArMTAsMzAgQEAKIHNldChQQUNLQUdFX1NUUklORyAiJHtQQUNLQUdFX05BTUV9ICR7UEFD
S0FHRV9WRVJTSU9OfSIpDQogc2V0KFBBQ0tBR0VfVEFSTkFNRSAiJHtQQUNLQUdFX05BTUV9IikN
CiANCitzZXQoTUFKT1IgIjEiKQ0KK3NldChNSU5PUiAiNiIpDQorc2V0KFBBVENIICIwIikNCisN
CitpZihOT1QgREVGSU5FRCBCSU5fSU5TVEFMTF9ESVIpDQorc2V0KEJJTl9JTlNUQUxMX0RJUiAk
e0NNQUtFX0lOU1RBTExfUFJFRklYfS9iaW4pDQorZW5kaWYoTk9UIERFRklORUQgQklOX0lOU1RB
TExfRElSKQ0KKw0KK2lmKE5PVCBERUZJTkVEIE1BTl9JTlNUQUxMX0RJUikNCitzZXQoTUFOX0lO
U1RBTExfRElSICR7Q01BS0VfS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sd2YvQ01ha2VMaXN0
cy50eHQKLS0tIGV4cGF0LTIuMS4wL3htbHdmL0NNYWtlTGlzdHMudHh0CTE5NzAtMDEtMDEgMDE6
MDA6MDAuMDAwMDAwMDAwICswMTAwCisrKyBleHBhdC0yLjEuMC1jbWFrZWZpeGVzL3htbHdmL0NN
YWtlTGlzdHMudHh0CTIwMTMtMDEtMjQgMDQ6NTY6MzAuNDgwMDA1MDY3ICswMTAwCkBAIC0wLDAg
KzEsMTMgQEAKK2lmKEJVSUxEX3Rvb2xzIEFORCBOT1QgV0lOQ0UpCisgICAgc2V0KHhtbHdmX1NS
Q1MKKyAgICAgICAgeG1sd2YuYworICAgICAgICB4bWxmaWxlLmMKKyAgICAgICAgY29kZXBhZ2Uu
YworICAgICAgICByZWFkZmlsZW1hcC5jCisgICAgKQorCisgICAgYWRkX2V4ZWN1dGFibGUoeG1s
d2YgJHt4bWx3Zl9TUkNTfSkKKyAgICB0YXJnZXRfbGlua19saWJyYXJpZXMoeG1sd2YgZXhwYXQp
CisgICAgaW5zdGFsbChUQVJHRVRTIHhtbHdmIERFU1RJTkFUSU9OICR7QklOX0lOU1RBTExfRElS
fSkKKyAgICBpbnN0YWxsKEZJTEVTICR7Q01BS0VfU09VUkNFX0RJUn0vZG9jL3htbHdmLjEgREVT
VElOQVRJT04gJHtNQU5fSU5TVEFMTF9ESVJ9L21hbjEpCitlbmRpZihCVUlMRF90b29scyBBTkQg
Tk9UIFdJTkNFKQo=
--f46d042a0d619e332604d4014b97
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Expat-bugs mailing list
[email protected]
http://mail.libexpat.org/mailman/listinfo/expat-bugs
--f46d042a0d619e332604d4014b97--