Opened 14 years ago

Closed 13 years ago

#25092 closed defect (fixed)

pidgin: gcc finds wrong config.h

Reported by: yaseppochi (Stephen J. Turnbull) Owned by: nefar@…
Priority: Normal Milestone:
Component: ports Version: 1.9.99
Keywords: Cc:
Port: pidgin

Description

Mac OS X 10.5.8
MacBook Pro (Intel Core Duo)
port and ports from svn
pidgin @2.7.0_0

The build barfs with

/bin/sh ../../../libtool --silent --tag=CC   --mode=compile /usr/bin/gcc-4.0 -DHAVE_CONFIG_H -I. -I../../..  -I../../.. -I../../../libpurple -I../../../libpurple -DLIBDIR=\"/opt/local/lib/purple-2\" -Wall  -DPURPLE_DISABLE_DEPRECATED -DPIDGIN_DISABLE_DEPRECATED -DFINCH_DISABLE_DEPRECATED -DGNT_DISABLE_DEPRECATED -D_REENTRANT -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include    -fno-common -DPERL_DARWIN -I/opt/local/include -no-cpp-precomp -fno-strict-aliasing -pipe -I/usr/local/include -I/opt/local/include  -I/opt/local/lib/perl5/5.8.9/darwin-2level/CORE  -I/opt/local/include -no-cpp-precomp  -g -O2 -arch i386 -MT perl-common.lo -MD -MP -MF .deps/perl-common.Tpo -c -o perl-common.lo perl-common.c
In file included from perl-common.h:19,
                 from perl-common.c:4:
../../../libpurple/internal.h:150:2: error: #error Unknown size of time_t
make: *** [perl-common.lo] Error 1

This is due to the build finding this config.h

wideload:plugins/perl 23:04$ sudo make perl-common.lo 2>&1 | grep config.h
..... /opt/local/lib/glib-2.0/include/glibconfig.h
... /opt/local/lib/perl5/5.8.9/darwin-2level/CORE/config.h

instead of pidgin's.

(To get that output, I hacked the Makefile to put -H in LTCOMPILE. Then some more hacking put -include $(CONFIG_HEADER) in that command to get a build ... so I don't have main.log etc any more.) I have no clue why gcc finds the wrong include file, the compile command given above looks OK to me. I also don't know if pidgin actaully works yet. :-)

Attachments (1)

patch-libpurple_internal.h (288 bytes) - added by yaseppochi (Stephen J. Turnbull) 14 years ago.
patch for issue 25092 gcc finds wrong config

Download all attachments as: .zip

Change History (8)

comment:1 Changed 14 years ago by mf2k (Frank Schima)

Cc: nefar@… removed
Owner: changed from macports-tickets@… to nefar@…

comment:2 Changed 14 years ago by nefar@…

How are you updating your ports? with port sync?

I'm not able to reproduce what you've got doing a regular install of ports. I don't see why svn would be any different, (and I'm new trying to help)

comment:3 Changed 14 years ago by yaseppochi (Stephen J. Turnbull)

No, that build was done based on cd Software/MacPorts; svn update; sudo port -u upgrade pidgin. I just realized a couple of days ago that port sync worked for svn (when my PortIndex disappeared without warning), and I don't think pidgin has been updated since.

I'm sick and busy with work right now, but I'll try to rebuild at the end of the week. If you don't get a report from me by Sunday 6/20, feel free to ping me.

svn could easily be different, depending on the status of other ports, in this case especially Perl (which provides the bogus config.h) and gcc (which doesn't seem to be following the documented rules for searching the -I path).

comment:4 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

Summary: gcc finds wrong config.h when building pidgin @2.7.0_0pidgin: gcc finds wrong config.h

comment:5 Changed 14 years ago by acpdev074@…

Hello, I'm seeing what seems to be this issue when building pidgin @2.7.3, using "sudo port install pidgin." As far as I know I'm doing the default, non-svn install.

../../../libpurple/internal.h:148:2: error: #error Unknown size of time_t

To get through the build I changed libpurple/internal.h in the build directory

 #ifdef HAVE_CONFIG_H
-# include <config.h>
+# include "../config.h"
 #endif

Probably this isn't the best fix.

Since the last message in this thread is from 4 months ago, seems useful to mention that this issue may still be an issue.

Changed 14 years ago by yaseppochi (Stephen J. Turnbull)

Attachment: patch-libpurple_internal.h added

patch for issue 25092 gcc finds wrong config

comment:6 in reply to:  5 Changed 14 years ago by yaseppochi (Stephen J. Turnbull)

Replying to acpdev074@…:

To get through the build I changed libpurple/internal.h in the build directory Probably this isn't the best fix.

It may not be the best fix, but since I can't see an easy way to get at LT_COMPILE from the Portfile, I've patchified it. Tested, built fine, see attachment.

Put the file in dports/net/pidgin/files/patch-libpurple_internal.h and add the line

patchfiles patch-libpurple_internal.h

to dports/net/pidgin/Portfile somewhere near the top.

comment:7 Changed 13 years ago by dbevans (David B. Evans)

Resolution: fixed
Status: newclosed

Committed as part of r74217.

Note: See TracTickets for help on using tickets.