pkg-config --cflags --libs gtk+-3.0: No such file or directory

Issues related to applications and software problems
Post Reply
mikeburr
Posts: 15
Joined: 2019/09/06 11:40:11

pkg-config --cflags --libs gtk+-3.0: No such file or directory

Post by mikeburr » 2019/09/11 15:29:40

dear reader
Yet more Linux Sh....
an apparantly well documented error
when using

gcc gtktest.c -o pl 'pkg-config --cflags --libs gtk+-2.0.pc'

results in the error
gcc: error: pkg-config --cflags --libs gtk+-3.0: No such file or directory

but sadly it is there ...
pkg-config --modversion gtk+-3.0
3.22.30
and this is consistent with the ... lib64/pkgconfig/gtk+-3.0.pc
entry
[so is gtk+-2.0
pkg-config --modversion gtk+-2.0
2.24.31]
[incidentally downloaded from epel repos shortly prior to the gcc test]

export PKG_CONFIG_PATH=/usr/lib64/pkgconfig
didnt help

anyone any ideas why
regards mike b

User avatar
TrevorH
Forum Moderator
Posts: 26942
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: pkg-config --cflags --libs gtk+-3.0: No such file or directory

Post by TrevorH » 2019/09/11 16:15:28

32 vs 64 bit?

yum provides '*/gtk+-3.0.pc'
...
Filename : /usr/lib/pkgconfig/gtk+-3.0.pc
...
Filename : /usr/lib64/pkgconfig/gtk+-3.0.pc
CentOS 5 died in March 2017 - migrate NOW!
CentOS 6 goes EOL sooner rather than later, get upgrading!
Full time Geek, part time moderator. Use the FAQ Luke

mikeburr
Posts: 15
Joined: 2019/09/06 11:40:11

Re: pkg-config --cflags --libs gtk+-3.0: No such file or directory

Post by mikeburr » 2019/09/11 16:39:05

good question Trevor
theres NO 32 bit install of the gtk+ only lib64
the gcc is default so presumably 64 bit
using gcc option -m32 makes no difference to the 'not found' which doesn't surprise me as it should look first for its environment and thus the directories before compiling

so you maybe on the right lines in that its somehow looking in lib not lib64 but then how do you explain the specific path not working and the pkg-config locating it .. thats what i couldnt figure
thanks though
mike b
ps ill copy it into lib and see what happens but im pretty sure its going to make no difference

User avatar
TrevorH
Forum Moderator
Posts: 26942
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: pkg-config --cflags --libs gtk+-3.0: No such file or directory

Post by TrevorH » 2019/09/11 16:40:57

Just install the right package from the yum provides I gave you. Don't copy the file.
CentOS 5 died in March 2017 - migrate NOW!
CentOS 6 goes EOL sooner rather than later, get upgrading!
Full time Geek, part time moderator. Use the FAQ Luke

mikeburr
Posts: 15
Joined: 2019/09/06 11:40:11

Re: pkg-config --cflags --libs gtk+-3.0: No such file or directory

Post by mikeburr » 2019/09/11 17:40:50

Trevor ...
i did use the yum command from epel as stated .. ive already made that clear in the screed
and adding a symbolic link to the directory from lib --> lib64 didnt have any effect
regards mikeb

User avatar
TrevorH
Forum Moderator
Posts: 26942
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: pkg-config --cflags --libs gtk+-3.0: No such file or directory

Post by TrevorH » 2019/09/12 00:49:10

So you ran yum install gtk3-devel.i686 and then tried and it didn't work?
CentOS 5 died in March 2017 - migrate NOW!
CentOS 6 goes EOL sooner rather than later, get upgrading!
Full time Geek, part time moderator. Use the FAQ Luke

chemal
Posts: 606
Joined: 2013/12/08 19:44:49

Re: pkg-config --cflags --libs gtk+-3.0: No such file or directory

Post by chemal » 2019/09/12 01:37:44

mikeburr wrote:
2019/09/11 15:29:40
gcc gtktest.c -o pl 'pkg-config --cflags --libs gtk+-2.0.pc'
That's two mistakes in one line. Correct is:

Code: Select all

gcc gtktest.c -o pl `pkg-config --cflags --libs gtk+-2.0`
No .pc extension and backticks instead of single quotation marks.

mikeburr
Posts: 15
Joined: 2019/09/06 11:40:11

Re: pkg-config --cflags --libs gtk+-3.0: No such file or directory

Post by mikeburr » 2019/09/12 08:07:23

thanks
the original cut and paste has two errors in it
firstly i was using 3.0 and only tried fully qualifying the name .pc and /usr/... later of which this is a residue
using gtk+-3.0 gave the same result so although the cut and paste is wrong what ive tried isnt wrong im afraid but thanks for pointing it out
ie i used ' pkg-config --cflags --libs gtk+-3.0' and tried 2.0 for good measure since both are there as stated

Trevor
i downloaded used yum -y install gtk+ to get both versions 2.0 and 3.0 from the epel repository
as to the the ....i686 [ i want 64 bit and wasnt sure if this is x32 ]
interestingly i used yum ... i686 just now
unset the PKG_CONFIG_PATH just in case
but with absolutely no difference
SAME RESULT
any one know why ?????
regards mike b

mikeburr
Posts: 15
Joined: 2019/09/06 11:40:11

Re: pkg-config --cflags --libs gtk+-3.0: No such file or directory

Post by mikeburr » 2019/09/12 08:12:30

Chemal .. excellent .!!!! thanks
BACKTICKS .. i didnt even know they existed and certainly would never have noticed them with my RUBBISH EYESIGHT
they are rather worn on this second hand laptop and not at all visible in mitigation
many thanks to yourself and Trevor for your suggestions and help
regards mike b

mikeburr
Posts: 15
Joined: 2019/09/06 11:40:11

Re: pkg-config --cflags --libs gtk+-3.0: No such file or directory

Post by mikeburr » 2019/09/12 08:35:32

Sequel
runs fine under gtk+-2.0 which is what the test was aimed at
link to tutorial : https://www.codeguru.com/cpp/cpp/creati ... h-gtk.html
which is a good starting point

[under 3.0 throws an error
gtktest.c:(.text+0xf9): undefined reference to `GTK_OBJECT'
collect2: error: ld returned 1 exit status
which surprises me a little ]
regards mike b

Post Reply

Return to “CentOS 7 - Software Support”