problem libmodbus

Asked by Kralik

Hello,
please help me
I don't install libbodbus to linux operating system.
I have last version libmodbus-1.2.4.tar.gz, I don't do ./configure, this is ended with error about failed version GLIB >2.X
I have linux CentOS, it is red hat.

thanks

Question information

Language:
English Edit question
Status:
Answered
For:
libmodbus Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Kralik (tomkralik) said :
#1

How I instal this version of program.
please help me

Revision history for this message
Stéphane Raimbault (sra) said :
#2

The glib package of development is required (named libglib2.0-dev on Debian) to compile the 1.2 series.
For information, the next release of libmodbus 2.0 doesn't depend on glib anymore.

Revision history for this message
Todd Denniston (todd-denniston) said :
#3

Under fedora (which RHEL/CentOS is derived from) you need the package glib2-devel and probably glib2.
On fedora, as root,
 I do `yum -y install glib2 glib2-devel`.

Revision history for this message
Kralik (tomkralik) said :
#4

I'm made this command "yum -y install glib2 glib2-devel",but next
i do command "./configure" ended with error
disleyed:
checking for pkg-config... /usr/local/bin/pkg-config
checking pkg-config is at least version 0.7... yes
checking for GLIB - version >= 2.0.0...
*** 'pkg-config --modversion glib-2.0' returned 2.0.0, but GLIB (2.4.7)
*** was found! If pkg-config was correct, then it is best
*** to remove the old version of GLib. You may also be able to fix the error
*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing
*** /etc/ld.so.conf. Make sure you have run ldconfig if that is
*** required on your system.
*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH
*** to point to the correct configuration files
no
configure: error: libmodbus needs GLib 2.X

please help me,
i try it already 2 week and ever nothing
I'm agonized

thanks

Revision history for this message
Todd Denniston (todd-denniston) said :
#5

if grep ^DAILY_UPDATE /etc/updatedb.conf|grep yes; then echo yes;else updatedb; fi
locate libglib-2

if the above returns anything other than you see output by the following commands:
rpm -q --list glib2 |grep libglib-2
rpm -q --list glib2-devel |grep libglib-2

it probably means you have attempted to install libglib-2 from source, and now that effort is getting in the way. You'll need to uninstall the libglib that you built from source and re run ldconfig.

if it does match, then you may want to remove the current build directory and untar the libmodbus package again, and try configuring again. (sometimes you get something stuck in ./configure and it is easer to suggest untar again instead of cleaning it up, when working across the net.)

if there are still problems, I would suggest checking CentOS's bugzilla for mention of problems with libglib. (and or bug Stéphane about cutting 1.9.X or 2.0.X, which will not have this problem :) :) :)

And as a temporary hack I have been known to hand tweak pkg-confg info ... Not recommended for less than extreme circumstances. :}

Revision history for this message
Kralik (tomkralik) said :
#6

sorry, I aren't good linuxer :-)
in Linux I am on the begin, perhaps a little along :-)

please, Can you made some simply instruction for this problem

in last answer is more information and I thanks you, but too I don't understand
thanks

i try command "locate libglib-2" result is
[root@localhost libmodbus-1.2.4]# locate libglib-2
/usr/lib/libglib-2.0.so.0.400.7
/usr/lib/libglib-2.0.so.0

and command "rpm -q ..."
[root@localhost libmodbus-1.2.4]# rpm -q --list glib2 |grep libglib-2
/usr/lib/libglib-2.0.so.0
/usr/lib/libglib-2.0.so.0.400.7
[root@localhost libmodbus-1.2.4]# rpm -q --list glib2-devel |grep libglib-2
/usr/lib/libglib-2.0.a
/usr/lib/libglib-2.0.so

Revision history for this message
Todd Denniston (todd-denniston) said :
#7

OK,
Looks like a package problem...
Some resources you'll need to read:

http://wiki.centos.org/GettingHelp
http://www.centos.org/modules/newbb/
and finally
http://bugs.centos.org/main_page.php

I think you are going to need to ask in one of their forums or mailing lists why the pkg-config data installed with glib2 & glib2-devel does not match the version of the library installed. When you do it include
 the output of `rpm -qa --last |grep glib2` and the output of ./configure you have above.

and let them know you are attempting to build libmodbus, they might be able to build it and tell you what they had to do.

BTW at this point I am assuming you never tried to build glib-2 from source on your system. Is that a correct assumption?

Revision history for this message
Kralik (tomkralik) said :
#8

Please, where is main problem?
What are you think?

What I'm looking for.

thanks

Revision history for this message
Stéphane Raimbault (sra) said :
#9

Kralik,

Your problems aren't related to the libmodbus.

Can you help with this problem?

Provide an answer of your own, or ask Kralik for more information if necessary.

To post a message you must log in.