glib-2.0 vs libglib2.0

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Post Reply
MintyFresh22
Level 1
Level 1
Posts: 10
Joined: Fri Jan 17, 2020 9:50 am

glib-2.0 vs libglib2.0

Post by MintyFresh22 »

Hi,

I am trying to build the latest version of ddcutil (the version in the software repo is 2 years out of date).
Step 1 of the build instructions is to run ./configure, this quits with the following error:

configure: error: Package requirements (glib-2.0 >= 2.32) were not met:

No package 'glib-2.0' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables GLIB_CFLAGS
and GLIB_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.


I am aware that in Mint distributions it is called libglib2.0 instead and apt list | grep libglib2 reports that I have both libglib2.0 and libglib2.0-dev 2.56.4-0 installed. I've checked all the prerequisites in the build instructions and have them all (including build-essential).

I understand paths in concept (eg in a Windows context) but don't know how to correct my PKG_CONFIG_PATH.
Can you help please?

MintyFresh22
Level 1
Level 1
Posts: 10
Joined: Fri Jan 17, 2020 9:50 am

Re: glib-2.0 vs libglib2.0

Post by MintyFresh22 »

Bump. (This is still driving me nuts).

I found a more recent build in this ppa but that only gets me to 0.9.2 for Ubuntu Bionic. Still 2 years out of date and no build of ddcui.

Any help greatly appreciated

User avatar
thx-1138
Level 8
Level 8
Posts: 2106
Joined: Fri Mar 10, 2017 12:15 pm
Location: Athens, Greece

Re: glib-2.0 vs libglib2.0

Post by thx-1138 »

...make sure you have autoconf, automake, autoconf-archive , libtool & pkg-config installed.
If you have a properly working toolchain environment, all you'd need is:
apt install libglib2.0-dev libudev-dev libusb-1.0-0-dev libx11-dev libxrandr-dev libdrm-dev
CFLAGS=-O2 ./configure --enable-lib=no
make V=1 -j$(nproc)

Then move the 3 conf files from /data/etc accordingly.

User avatar
trytip
Level 13
Level 13
Posts: 4756
Joined: Tue Jul 05, 2016 1:20 pm

Re: glib-2.0 vs libglib2.0

Post by trytip »

i shouldn't have to put a disclaimer anymore but create timeshift first, because you are upgrading some packages
ddcutil_0.9.8-2_amd64 <<< you know what i just downloaded it from ubuntu 20.04 focal-updates
install with sudo dpkg -i *.deb or install individually starting with the usb upgrades
create timeshift before installing
you still need ddcui but not available in ubuntu 20.04 and building with qt5 is another headache of missing qt5 modules and packages
the developer of ddcutil made a mess building these packages instead of having clear install corrections on his github like firejail does
Image

MintyFresh22
Level 1
Level 1
Posts: 10
Joined: Fri Jan 17, 2020 9:50 am

Re: glib-2.0 vs libglib2.0

Post by MintyFresh22 »

Thank you thx-1138, that did the trick (ddcutil) :)

Noted thanks trytip, I'll have a go at dddui when I can spare a bit of time.

Cheers

Post Reply

Return to “Newbie Questions”