Opened 14 years ago

Closed 14 years ago

#23834 closed defect (worksforme)

glib2 @2.22.4 breaks when compiling in Snow Leopard

Reported by: daniel.koch@… Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 1.8.2
Keywords: Cc:
Port: glib2

Description (last modified by jmroot (Joshua Root))

--->  Fetching glib2
--->  Attempting to fetch glib-2.22.4.tar.bz2 from http://linorg.usp.br/gnome/sources/glib/2.22/
--->  Verifying checksum(s) for glib2
--->  Extracting glib2
--->  Applying patches to glib2
--->  Configuring glib2
--->  Building glib2
Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_glib2/work/glib-2.22.4" && /usr/bin/make -j2 all " returned error 2
Command output: /bin/sh ../libtool  --tag=CC   --mode=compile /usr/bin/gcc-4.2 -DHAVE_CONFIG_H -I. -I..  -DG_LOG_DOMAIN=\"GLib-GIO\" -I.. -I.. -I../glib -I../gmodule -DG_DISABLE_CAST_CHECKS -DG_DISABLE_DEPRECATED -DGIO_COMPILATION -DGIO_MODULE_DIR=\"/opt/local/lib/gio/modules\"  -I/opt/local/include -DG_DISABLE_SINGLE_INCLUDES -D_REENTRANT  -O2 -fstrict-aliasing -arch x86_64 -Wall -MT gunixvolumemonitor.lo -MD -MP -MF .deps/gunixvolumemonitor.Tpo -c -o gunixvolumemonitor.lo gunixvolumemonitor.c
libtool: compile:  /usr/bin/gcc-4.2 -DHAVE_CONFIG_H -I. -I.. -DG_LOG_DOMAIN=\"GLib-GIO\" -I.. -I.. -I../glib -I../gmodule -DG_DISABLE_CAST_CHECKS -DG_DISABLE_DEPRECATED -DGIO_COMPILATION -DGIO_MODULE_DIR=\"/opt/local/lib/gio/modules\" -I/opt/local/include -DG_DISABLE_SINGLE_INCLUDES -D_REENTRANT -O2 -fstrict-aliasing -arch x86_64 -Wall -MT gunixvolumemonitor.lo -MD -MP -MF .deps/gunixvolumemonitor.Tpo -c gunixvolumemonitor.c  -fno-common -DPIC -o .libs/gunixvolumemonitor.o
libtool: compile:  /usr/bin/gcc-4.2 -DHAVE_CONFIG_H -I. -I.. -DG_LOG_DOMAIN=\"GLib-GIO\" -I.. -I.. -I../glib -I../gmodule -DG_DISABLE_CAST_CHECKS -DG_DISABLE_DEPRECATED -DGIO_COMPILATION -DGIO_MODULE_DIR=\"/opt/local/lib/gio/modules\" -I/opt/local/include -DG_DISABLE_SINGLE_INCLUDES -D_REENTRANT -O2 -fstrict-aliasing -arch x86_64 -Wall -MT gunixvolume.lo -MD -MP -MF .deps/gunixvolume.Tpo -c gunixvolume.c -o gunixvolume.o >/dev/null 2>&1
libtool: compile:  /usr/bin/gcc-4.2 -DHAVE_CONFIG_H -I. -I.. -DG_LOG_DOMAIN=\"GLib-GIO\" -I.. -I.. -I../glib -I../gmodule -DG_DISABLE_CAST_CHECKS -DG_DISABLE_DEPRECATED -DGIO_COMPILATION -DGIO_MODULE_DIR=\"/opt/local/lib/gio/modules\" -I/opt/local/include -DG_DISABLE_SINGLE_INCLUDES -D_REENTRANT -O2 -fstrict-aliasing -arch x86_64 -Wall -MT gunixvolumemonitor.lo -MD -MP -MF .deps/gunixvolumemonitor.Tpo -c gunixvolumemonitor.c -o gunixvolumemonitor.o >/dev/null 2>&1
mv -f .deps/gunixvolume.Tpo .deps/gunixvolume.Plo
/bin/sh ../libtool  --tag=CC   --mode=compile /usr/bin/gcc-4.2 -DHAVE_CONFIG_H -I. -I..  -DG_LOG_DOMAIN=\"GLib-GIO\" -I.. -I.. -I../glib -I../gmodule -DG_DISABLE_CAST_CHECKS -DG_DISABLE_DEPRECATED -DGIO_COMPILATION -DGIO_MODULE_DIR=\"/opt/local/lib/gio/modules\"  -I/opt/local/include -DG_DISABLE_SINGLE_INCLUDES -D_REENTRANT  -O2 -fstrict-aliasing -arch x86_64 -Wall -MT gunixinputstream.lo -MD -MP -MF .deps/gunixinputstream.Tpo -c -o gunixinputstream.lo gunixinputstream.c
libtool: compile:  /usr/bin/gcc-4.2 -DHAVE_CONFIG_H -I. -I.. -DG_LOG_DOMAIN=\"GLib-GIO\" -I.. -I.. -I../glib -I../gmodule -DG_DISABLE_CAST_CHECKS -DG_DISABLE_DEPRECATED -DGIO_COMPILATION -DGIO_MODULE_DIR=\"/opt/local/lib/gio/modules\" -I/opt/local/include -DG_DISABLE_SINGLE_INCLUDES -D_REENTRANT -O2 -fstrict-aliasing -arch x86_64 -Wall -MT gunixinputstream.lo -MD -MP -MF .deps/gunixinputstream.Tpo -c gunixinputstream.c  -fno-common -DPIC -o .libs/gunixinputstream.o
mv -f .deps/gunixvolumemonitor.Tpo .deps/gunixvolumemonitor.Plo
/bin/sh ../libtool  --tag=CC   --mode=compile /usr/bin/gcc-4.2 -DHAVE_CONFIG_H -I. -I..  -DG_LOG_DOMAIN=\"GLib-GIO\" -I.. -I.. -I../glib -I../gmodule -DG_DISABLE_CAST_CHECKS -DG_DISABLE_DEPRECATED -DGIO_COMPILATION -DGIO_MODULE_DIR=\"/opt/local/lib/gio/modules\"  -I/opt/local/include -DG_DISABLE_SINGLE_INCLUDES -D_REENTRANT  -O2 -fstrict-aliasing -arch x86_64 -Wall -MT gunixoutputstream.lo -MD -MP -MF .deps/gunixoutputstream.Tpo -c -o gunixoutputstream.lo gunixoutputstream.c
libtool: compile:  /usr/bin/gcc-4.2 -DHAVE_CONFIG_H -I. -I.. -DG_LOG_DOMAIN=\"GLib-GIO\" -I.. -I.. -I../glib -I../gmodule -DG_DISABLE_CAST_CHECKS -DG_DISABLE_DEPRECATED -DGIO_COMPILATION -DGIO_MODULE_DIR=\"/opt/local/lib/gio/modules\" -I/opt/local/include -DG_DISABLE_SINGLE_INCLUDES -D_REENTRANT -O2 -fstrict-aliasing -arch x86_64 -Wall -MT gunixoutputstream.lo -MD -MP -MF .deps/gunixoutputstream.Tpo -c gunixoutputstream.c  -fno-common -DPIC -o .libs/gunixoutputstream.o
libtool: compile:  /usr/bin/gcc-4.2 -DHAVE_CONFIG_H -I. -I.. -DG_LOG_DOMAIN=\"GLib-GIO\" -I.. -I.. -I../glib -I../gmodule -DG_DISABLE_CAST_CHECKS -DG_DISABLE_DEPRECATED -DGIO_COMPILATION -DGIO_MODULE_DIR=\"/opt/local/lib/gio/modules\" -I/opt/local/include -DG_DISABLE_SINGLE_INCLUDES -D_REENTRANT -O2 -fstrict-aliasing -arch x86_64 -Wall -MT gunixinputstream.lo -MD -MP -MF .deps/gunixinputstream.Tpo -c gunixinputstream.c -o gunixinputstream.o >/dev/null 2>&1
libtool: compile:  /usr/bin/gcc-4.2 -DHAVE_CONFIG_H -I. -I.. -DG_LOG_DOMAIN=\"GLib-GIO\" -I.. -I.. -I../glib -I../gmodule -DG_DISABLE_CAST_CHECKS -DG_DISABLE_DEPRECATED -DGIO_COMPILATION -DGIO_MODULE_DIR=\"/opt/local/lib/gio/modules\" -I/opt/local/include -DG_DISABLE_SINGLE_INCLUDES -D_REENTRANT -O2 -fstrict-aliasing -arch x86_64 -Wall -MT gunixoutputstream.lo -MD -MP -MF .deps/gunixoutputstream.Tpo -c gunixoutputstream.c -o gunixoutputstream.o >/dev/null 2>&1
mv -f .deps/gunixinputstream.Tpo .deps/gunixinputstream.Plo
/bin/sh ../libtool  --tag=CC   --mode=compile /usr/bin/gcc-4.2 -DHAVE_CONFIG_H -I. -I..  -DG_LOG_DOMAIN=\"GLib-GIO\" -I.. -I.. -I../glib -I../gmodule -DG_DISABLE_CAST_CHECKS -DG_DISABLE_DEPRECATED -DGIO_COMPILATION -DGIO_MODULE_DIR=\"/opt/local/lib/gio/modules\"  -I/opt/local/include -DG_DISABLE_SINGLE_INCLUDES -D_REENTRANT  -O2 -fstrict-aliasing -arch x86_64 -Wall -MT glocaldirectorymonitor.lo -MD -MP -MF .deps/glocaldirectorymonitor.Tpo -c -o glocaldirectorymonitor.lo glocaldirectorymonitor.c
libtool: compile:  /usr/bin/gcc-4.2 -DHAVE_CONFIG_H -I. -I.. -DG_LOG_DOMAIN=\"GLib-GIO\" -I.. -I.. -I../glib -I../gmodule -DG_DISABLE_CAST_CHECKS -DG_DISABLE_DEPRECATED -DGIO_COMPILATION -DGIO_MODULE_DIR=\"/opt/local/lib/gio/modules\" -I/opt/local/include -DG_DISABLE_SINGLE_INCLUDES -D_REENTRANT -O2 -fstrict-aliasing -arch x86_64 -Wall -MT glocaldirectorymonitor.lo -MD -MP -MF .deps/glocaldirectorymonitor.Tpo -c glocaldirectorymonitor.c  -fno-common -DPIC -o .libs/glocaldirectorymonitor.o
mv -f .deps/gunixoutputstream.Tpo .deps/gunixoutputstream.Plo
/bin/sh ../libtool  --tag=CC   --mode=compile /usr/bin/gcc-4.2 -DHAVE_CONFIG_H -I. -I..  -DG_LOG_DOMAIN=\"GLib-GIO\" -I.. -I.. -I../glib -I../gmodule -DG_DISABLE_CAST_CHECKS -DG_DISABLE_DEPRECATED -DGIO_COMPILATION -DGIO_MODULE_DIR=\"/opt/local/lib/gio/modules\"  -I/opt/local/include -DG_DISABLE_SINGLE_INCLUDES -D_REENTRANT  -O2 -fstrict-aliasing -arch x86_64 -Wall -MT glocalfile.lo -MD -MP -MF .deps/glocalfile.Tpo -c -o glocalfile.lo glocalfile.c
libtool: compile:  /usr/bin/gcc-4.2 -DHAVE_CONFIG_H -I. -I.. -DG_LOG_DOMAIN=\"GLib-GIO\" -I.. -I.. -I../glib -I../gmodule -DG_DISABLE_CAST_CHECKS -DG_DISABLE_DEPRECATED -DGIO_COMPILATION -DGIO_MODULE_DIR=\"/opt/local/lib/gio/modules\" -I/opt/local/include -DG_DISABLE_SINGLE_INCLUDES -D_REENTRANT -O2 -fstrict-aliasing -arch x86_64 -Wall -MT glocalfile.lo -MD -MP -MF .deps/glocalfile.Tpo -c glocalfile.c  -fno-common -DPIC -o .libs/glocalfile.o
libtool: compile:  /usr/bin/gcc-4.2 -DHAVE_CONFIG_H -I. -I.. -DG_LOG_DOMAIN=\"GLib-GIO\" -I.. -I.. -I../glib -I../gmodule -DG_DISABLE_CAST_CHECKS -DG_DISABLE_DEPRECATED -DGIO_COMPILATION -DGIO_MODULE_DIR=\"/opt/local/lib/gio/modules\" -I/opt/local/include -DG_DISABLE_SINGLE_INCLUDES -D_REENTRANT -O2 -fstrict-aliasing -arch x86_64 -Wall -MT glocaldirectorymonitor.lo -MD -MP -MF .deps/glocaldirectorymonitor.Tpo -c glocaldirectorymonitor.c -o glocaldirectorymonitor.o >/dev/null 2>&1
glocalfile.c: In function 'g_local_file_query_filesystem_info':
glocalfile.c:933: error: storage size of 'statfs_buffer' isn't known
glocalfile.c:945: warning: implicit declaration of function 'statfs'
glocalfile.c:933: warning: unused variable 'statfs_buffer'
make[4]: *** [glocalfile.lo] Error 1
make[4]: *** Waiting for unfinished jobs....
mv -f .deps/glocaldirectorymonitor.Tpo .deps/glocaldirectorymonitor.Plo
make[3]: *** [all-recursive] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Attachments (1)

output.txt (307.0 KB) - added by daniel.koch@… 14 years ago.
The first full output using port -d install glib2

Download all attachments as: .zip

Change History (9)

comment:1 Changed 14 years ago by daniel.koch@…

(duplicate comment removed by admin)

comment:2 Changed 14 years ago by jmroot (Joshua Root)

Description: modified (diff)
Milestone: MacPorts 1.8.3
Owner: changed from macports-tickets@… to ryandesign@…

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

Summary: glib-2.22.4 breaks when compiling in Snow Leopardglib2 @2.22.4 breaks when compiling in Snow Leopard

Please clean and try again with the debug switch and attach the full output. It builds fine for me.

sudo port clean glib2
sudo port -d install glib2

Changed 14 years ago by daniel.koch@…

Attachment: output.txt added

The first full output using port -d install glib2

comment:4 Changed 14 years ago by daniel.koch@…

Hi.

I hacked the glocalfile.c source code and now I can compile glib2 successfully.

In the beginning of file we have ifdefs to choice to use STATVFS or STATFS, as follows:

#if defined(HAVE_STATFS) && defined(HAVE_STATVFS)
/* Some systems have both statfs and statvfs, pick the
   most "native" for these */
# if !defined(HAVE_STRUCT_STATFS_F_BAVAIL)
   /* on solaris and irix, statfs doesn't even have the
      f_bavail field */
#  define USE_STATVFS
# else
  /* at least on linux, statfs is the actual syscall */
#  define USE_STATFS
# endif

#elif defined(HAVE_STATFS)

# define USE_STATFS

#elif defined(HAVE_STATVFS)

# define USE_STATVFS

#endif

I dont know what's it, but I've checked includes and STATFS (struct statfs) isn't included (and defined). I checked the file /usr/include/sys/statvfs.h and found only statvfs.

Then I hacked this file by adding the following code, then I force source to use statvfs instead, solving *my* problem.

#undef USE_STATFS
#define USE_STATVFS

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

I can't comment on the changes you propose. I don't know the glib source that well (or at all). If you believe these changes should be incorporated, please send them to the developers of glib.

As I said, it already builds fine without changes on my system so something is different about your system that's causing this. Comparing your configure output to mine, the only difference is that mine says:

checking malloc.h usability... no
checking malloc.h presence... no
checking for malloc.h... no
checking sys/vfs.h usability... no
checking sys/vfs.h presence... no
checking for sys/vfs.h... no

while yours says:

checking malloc.h usability... yes
checking malloc.h presence... yes
checking for malloc.h... yes
checking sys/vfs.h usability... yes
checking sys/vfs.h presence... yes
checking for sys/vfs.h... yes

I do have files called malloc.h in /usr/include/malloc, /usr/include/objc and /usr/include/sys but apparently glib doesn't find them there and apparently that's how it should be, but on your system a malloc.h is being found. Do you have a malloc.h in some other location, perhaps directly in /usr/include, or perhaps in /usr/local/include?

comment:6 Changed 14 years ago by daniel.koch@…

It was why I think the problem are about compiling in ports.

I've both files:

$ ls -la /usr/include/malloc.h 
lrwxr-xr-x  1 root  wheel  28 29 Nov 23:18 /usr/include/malloc.h -> /usr/include/malloc/malloc.h
$ ls -la /usr/include/malloc/malloc.h 
-r--r--r--  1 root  wheel  10687 14 Jul  2009 /usr/include/malloc/malloc.h

But I've found something about this, maybe can it be wrong why I've MacFUSE installed?

http://markmail.org/message/brdtrnud4mb5wmos

comment:7 in reply to:  6 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to daniel.koch@…:

It was why I think the problem are about compiling in ports.

What was?

I've both files:

$ ls -la /usr/include/malloc.h
lrwxr-xr-x 1 root wheel 28 29 Nov 23:18 /usr/include/malloc.h -> /usr/include/malloc/malloc.h
$ ls -la /usr/include/malloc/malloc.h
-r--r--r-- 1 root wheel 10687 14 Jul 2009 /usr/include/malloc/malloc.h

Ok, you have /usr/include/malloc.h which points to /usr/include/malloc/malloc.h. You didn't show anything about whether you have a /usr/local/include/malloc.h. But that's ok; the /usr/include/malloc.h symlink may already be the culprit. Why is that symlink there? How did it get there? As I said I don't have that, so I don't think it's part of a standard Mac OS X system. Try removing it, cleaning the affected port, and trying again.

But I've found something about this, maybe can it be wrong why I've MacFUSE installed?
http://markmail.org/message/brdtrnud4mb5wmos

I don't see "malloc.h" on that page. What aspect of that article specifically did you think related to your glib2 situation?

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

Resolution: worksforme
Status: newclosed

Closing due to lack of response.

Note: See TracTickets for help on using tickets.