[Linux-HA] Compile error building 2.1.2 on RHEL5 64 bit

Dejan Muhamedagic dejanmm at fastmail.fm
Wed Sep 19 05:24:43 MDT 2007


Hi,

On Fri, Sep 14, 2007 at 11:00:12AM -0400, Doug Knight wrote:
> I have the following version of glib2 on both the full RHEL5 system and
> on the RHEL5 Beta:
> 
> glib2-2.12.3-2.fc6
> glib2-devel-2.12.3-2.fc6
> 
> I noticed that the statement it complained about had to do with the
> following two calls to GUINT_TO_POINTER:
> 
>         /* verify the credential information. */
>         if (    auth_info->uid
>         &&      (g_hash_table_lookup(auth_info->uid
>                 ,       GUINT_TO_POINTER((guint)cred.uid)) != NULL)) {
>                 ret = IPC_OK;
>         }else if (auth_info->gid
>         &&      (g_hash_table_lookup(auth_info->gid
>                 ,       GUINT_TO_POINTER((guint)cred.gid)) != NULL)) {
>                 ret = IPC_OK;
>         }

> I tried to track down where "cred"'s type and structure was declared
> (ucred), but was unsuccessful.

That's somewhere in /usr/include/.../socket.h. The structure
contains uid and gid types which are typically 32-bit. Hence the
warning.

> From the warning it seemed that changing
> a cast somewhere might resolve it. I've had to make similar changes
> elsewhere in heartbeat (libnet_util/send_arc.c, lib/crm/cib/cib_attrs.c,
> and resources/OCF/IPv6addr.c in particular) and in some of our apps, and
> it seems to be common to the 64 bit systems.

Right. I think that you should complain to RedHat about the glib2
on 64-bit platforms. My guess is that GUINT_TO_POINTER is not
defined properly. Alternatively, it could be that the package
(glib2-devel) you installed was configured on a 32-bit platform.

Thanks,

Dejan

> 
> Doug
> 
> On Fri, 2007-09-14 at 11:43 +0200, Dejan Muhamedagic wrote:
> 
> > Hi,
> > 
> > On Thu, Sep 13, 2007 at 11:32:11AM -0400, Doug Knight wrote:
> > > We recently upgraded from RHEL5 Beta to the full RHEL5. I did a quick
> > > check against the glib-related RPMs installed, and found that the full
> > > RHEL5 did not have glib installed (it had glib2 though). Comparing back
> > > to a system which still had the beta release I saw the
> > > glib-1.2.10-19.el5 RPM installed. I downloaded the RH Network-provided
> > > glib (glib-1.2.10-20.el5) onto the full RHEL5 system, started with a
> > > fresh untar of the tarball, and got the same warning.
> > 
> > Sorry, I was not clean enough, heartbeat is using glib2 only. So,
> > you should see which glib2 version you have installed. Please
> > open a bug with the release information.
> > 
> > > Next, I tried
> > > building the 2.1.2 tarball on the beta release, and it built fine (aside
> > > from a missing libnet and a couple of "signedness" issues I ran into
> > > earlier building 2.0.8, which I manually integrated into the newer
> > > source). Are there other libraries/RPMs which I could compare? The gcc
> > > compiler on both systems is 4.1.1, with the only difference I see being
> > > "target" (beta says x86_64-unknown-linux-gnu, full v5 says
> > > x86_64-redhat-linux). I've seen this difference in other builds, but it
> > > didn't seem to affect anything.
> > > 
> > > On a similar thread, does anyone have a good reason why I should not
> > > --disable-fatal-warnings?
> > 
> > If we can help it, we get rid of warnings at compile time. A
> > warning is a potential runtime problem.
> > 
> > Thanks,
> > 
> > Dejan
> > 
> > > Doug
> > > 
> > > On Thu, 2007-09-13 at 16:03 +0200, Dejan Muhamedagic wrote:
> > > 
> > > > Hi,
> > > > 
> > > > On Thu, Sep 13, 2007 at 09:32:06AM -0400, Doug Knight wrote:
> > > > > I could do that, but isn't there a reason why warnings are set to fatal
> > > > > for the build?
> > > > 
> > > > True.
> > > > 
> > > > > Also, I successfully built the 2.0.8 on the same system
> > > > > some time ago. I was building the 2.1.2 to try it out as an upgrade to
> > > > > our existing configuration.
> > > > 
> > > > Peeking at the code, it seems to be a problem with glib
> > > > compatibility. Did you update the glib lately? That part of the
> > > > coded didn't change in a while.
> > > > 
> > > > Thanks.
> > > > 
> > > > Dejan
> > > > 
> > > > > Doug
> > > > > On Thu, 2007-09-13 at 14:55 +0200, Christian Frank wrote:
> > > > > 
> > > > > > Hi,
> > > > > > 
> > > > > > add --disable-fatal-warnings to the configure.
> > > > > > 
> > > > > > cause "cc1: warnings being treated as errors" will stop compiling
> > > > > > everytime you have a compiler warning.
> > > > > > 
> > > > > > 
> > > > > > Regards,
> > > > > > Christian
> > > > > > 
> > > > > > Doug Knight schrieb:
> > > > > > > All,
> > > > > > > I just downloaded the 2.1.2 tar ball to my RHEL5 64 bit system, and got
> > > > > > > the following error during the ConfigureMe make phase:
> > > > > > > 
> > > > > > >  gcc -DHAVE_CONFIG_H -I. -I. -I../../include -I../../include
> > > > > > > -I../../include -I../../include -I../../linux-ha -I../../linux-ha
> > > > > > > -I../../libltdl -I../../libltdl -I/usr/include/glib-2.0
> > > > > > > -I/usr/lib/glib-2.0/include -I/usr/include/libxml2 -g -O2 -Wall
> > > > > > > -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes
> > > > > > > -Wdeclaration-after-statement -Wpointer-arith -Wwrite-strings
> > > > > > > -Wcast-qual -Wcast-align -Wbad-function-cast -Winline
> > > > > > > -Wmissing-format-attribute -Wformat=2 -Wformat-security
> > > > > > > -Wformat-nonliteral -Wno-long-long -Wno-strict-aliasing -Werror -ggdb3
> > > > > > > -funsigned-char -DALIGNFUNC= -DMSGHDR_TYPE=msghdr -g -O2 -Wall
> > > > > > > -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes
> > > > > > > -Wdeclaration-after-statement -Wpointer-arith -Wwrite-strings
> > > > > > > -Wcast-qual -Wcast-align -Wbad-function-cast -Winline
> > > > > > > -Wmissing-format-attribute -Wformat=2 -Wformat-security
> > > > > > > -Wformat-nonliteral -Wno-long-long -Wno-strict-aliasing -Werror -ggdb3
> > > > > > > -funsigned-char -MT ipcsocket.lo -MD -MP -MF .deps/ipcsocket.Tpo -c
> > > > > > > ipcsocket.c  -fPIC -DPIC -o .libs/ipcsocket.o
> > > > > > > cc1: warnings being treated as errors
> > > > > > > ipcsocket.c: In function 'socket_verify_auth':
> > > > > > > ipcsocket.c:2293: warning: cast to pointer from integer of different
> > > > > > > size
> > > > > > > ipcsocket.c:2297: warning: cast to pointer from integer of different
> > > > > > > size
> > > > > > > gmake[2]: *** [ipcsocket.lo] Error 1
> > > > > > > gmake[2]: Leaving directory
> > > > > > > `/root/Downloads/heartbeat/heartbeat-2.1.2/lib/clplumbing'
> > > > > > > gmake[1]: *** [all-recursive] Error 1
> > > > > > > gmake[1]: Leaving directory
> > > > > > > `/root/Downloads/heartbeat/heartbeat-2.1.2/lib'
> > > > > > > gmake: *** [all-recursive] Error 1
> > > > > > > 
> > > > > > > 
> > > > > > > Has anyone seen this before, or anyone know what to correct to complete
> > > > > > > the build?
> > > > > > > 
> > > > > > > Thanks,
> > > > > > > Doug Knight
> > > > > > > _______________________________________________
> > > > > > > Linux-HA mailing list
> > > > > > > Linux-HA at lists.linux-ha.org
> > > > > > > http://lists.linux-ha.org/mailman/listinfo/linux-ha
> > > > > > > See also: http://linux-ha.org/ReportingProblems
> > > > > > 
> > > > > > ****************************************************************************
> > > > > > This email and any files transmitted with it are confidential and
> > > > > > intended solely for the use of the individual or entity to whom they
> > > > > > are addressed. Access to this e-mail by anyone else is unauthorised.
> > > > > > If you are not the intended recipient, any disclosure, copying,
> > > > > > distribution or any action taken or omitted to be taken in reliance on
> > > > > > it, is prohibited.
> > > > > > E-mail messages are not necessarily secure.  Renesas does not accept
> > > > > > responsibility for any changes made to this message after it was sent.
> > > > > > Please note that this email message has been swept by Renesas for
> > > > > > the presence of computer viruses.
> > > > > > 
> > > > > > Renesas Semiconductor Europe (Landshut) GmbH
> > > > > > Jenaer Strasse 1, 84034 Landshut
> > > > > > Tel.: +49-(0)871-684-0, Fax: +49-(0)871-684-150
> > > > > > www.rsel.renesas.com
> > > > > > 
> > > > > > GESCHAEFTSFUEHRER:  Dipl.-Ing. YOSHIHARU KAKUI
> > > > > > GESCHAEFTSFUEHRER:  Dipl.-Phys. STEFAN SAUER
> > > > > > 
> > > > > > Registergericht Landshut HRB 1464
> > > > > > Ust-ldNr.: DE 128953054  Steuer-Nr.: 132/136/30347
> > > > > > 
> > > > > > HypoVereinsbank, Landshut, Kto.-Nr. 3704 700 (BLZ  743 200 73) 
> > > > > > Mizuho Corporate Bank (Germany) AG, Frankfurt, Kto.-Nr. 200 733 (BLZ 503 308 00)
> > > > > > ****************************************************************************
> > > > > > 
> > > > > > _______________________________________________
> > > > > > Linux-HA mailing list
> > > > > > Linux-HA at lists.linux-ha.org
> > > > > > http://lists.linux-ha.org/mailman/listinfo/linux-ha
> > > > > > See also: http://linux-ha.org/ReportingProblems
> > > > > > 
> > > > > _______________________________________________
> > > > > Linux-HA mailing list
> > > > > Linux-HA at lists.linux-ha.org
> > > > > http://lists.linux-ha.org/mailman/listinfo/linux-ha
> > > > > See also: http://linux-ha.org/ReportingProblems
> > > > _______________________________________________
> > > > Linux-HA mailing list
> > > > Linux-HA at lists.linux-ha.org
> > > > http://lists.linux-ha.org/mailman/listinfo/linux-ha
> > > > See also: http://linux-ha.org/ReportingProblems
> > > > 
> > > _______________________________________________
> > > Linux-HA mailing list
> > > Linux-HA at lists.linux-ha.org
> > > http://lists.linux-ha.org/mailman/listinfo/linux-ha
> > > See also: http://linux-ha.org/ReportingProblems
> > _______________________________________________
> > Linux-HA mailing list
> > Linux-HA at lists.linux-ha.org
> > http://lists.linux-ha.org/mailman/listinfo/linux-ha
> > See also: http://linux-ha.org/ReportingProblems
> > 
> _______________________________________________
> Linux-HA mailing list
> Linux-HA at lists.linux-ha.org
> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> See also: http://linux-ha.org/ReportingProblems



More information about the Linux-HA mailing list