iniparser header files in sub directory on ubuntu but not on other distros

Asked by superfremtid

iniparser.h is located in /usr/include/iniparser/iniparser.h on ubuntu, but in /usr/include/iniparser.h on other distros.

fedora already worked around this by adding a symlink:

https://bugzilla.redhat.com/show_bug.cgi?id=1635706

but on arch there is no such thing. this creates the need for advanced autotool detection and or manual setting of include paths.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu iniparser Edit question
Assignee:
No assignee Edit question
Solved by:
superfremtid
Solved:
Last query:
Last reply:
Revision history for this message
Bernard Stafford (bernard010) said :
#1

Terminal: cat /etc/os-release; uname -r

https://packages.ubuntu.com/focal/libiniparser1
To install iniparser1:
sudo apt install iniparser1
Otherwise: https://forums.fedoraforum.org/forum.php
If you are using Fedora.

Revision history for this message
superfremtid (karl-stavestrand) said :
#2

cat /etc/os-release; uname -r

PRETTY_NAME="Ubuntu 21.10"
NAME="Ubuntu"
VERSION_ID="21.10"
VERSION="21.10 (Impish Indri)"
VERSION_CODENAME=impish
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=impish
5.13.0-25-generic

Revision history for this message
superfremtid (karl-stavestrand) said :
#3

I might have been a bit brief in this original post.

Installation of iniparser itself is not a problem.

the problem is that the include of iniparser.h is different on ubuntu and other distros.

other distros:

#include <iniparser.h>

ubuntu;

#include <iniparser/iniparser.h>

this is a problem.

some of the damage is already done here, by doing this differently across distros, but an additional packaged symlink /usr/include/iniparser.h -> /usr/include/iniparser/iniparser.h would be a nice band-aid solution. The opposite symlinik is already in the fedora package.

Revision history for this message
Manfred Hampl (m-hampl) said :
#4

Ubuntu is copying packages from Debian (to avoid double packaging work) and as far as I can see also Debian has the iniparser.h in a subdirectory. If you want to suggest that this is changed, then you better ask at Debian and Ubuntu will follow suit.

BUT:

If I look at the contents of the libiniparser-dev package, then I see that it not only contains iniparser.h, but also a dictionary.h header file. And if I go a step further to check which other packages provide dictionary.h, then I see several of them. If each of them wants to have its dictionary.h in the /usr/include/ directory, then there is a conflict.

Thus in my opinion the Ubuntu/Debian approach is correct and other distros who have the file in the /usr/include/ should reconsider their placing.

https://packages.ubuntu.com/search?suite=focal&arch=any&mode=exactfilename&searchon=contents&keywords=dictionary.h

Revision history for this message
superfremtid (karl-stavestrand) said :
#5

ah I forgot to check debian first, that was my bad.

however, I do think you are correct, the debian approach is better. i will raise any issues with other distros instead.

thanks!