Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#35948 closed defect (fixed)

grace: build fails with libpng 1.5

Reported by: bcbarnes@… Owned by: ryandesign (Ryan Schmidt)
Priority: Normal Milestone:
Component: ports Version:
Keywords: haspatch Cc: rmstonecipher@…, hapaguy (Brian Kurt Fujikawa), jvianalopes@…, dstaple@…
Port: grace


The latest revision of grace, 5.1.22_7, fails to build on OS X 10.8.1 with Xcode 4.4.1 and latest command line tools.

:info:build /usr/bin/clang -pipe -O2 -arch x86_64 -I.. -I.  -I../Xbae -I/opt/local/include -I/opt/local/include -I/opt/local/include  -c -o rstdrv.o rstdrv.c
:info:build rstdrv.c:888:23: error: incomplete definition of type 'struct png_struct_def'
:info:build     if (setjmp(png_ptr->jmpbuf)) {
:info:build                ~~~~~~~^
:info:build /opt/local/include/png.h:854:16: note: forward declaration of 'struct png_struct_def'
:info:build typedef struct png_struct_def png_struct;
:info:build                ^
:info:build rstdrv.c:1030:22: error: use of undeclared identifier 'Z_NO_COMPRESSION'
:info:build             (double) Z_NO_COMPRESSION, (double) Z_BEST_COMPRESSION, 1.0);
:info:build                      ^
:info:build 2 errors generated.
:info:build make[1]: *** [rstdrv.o] Error 1
:info:build make[1]: *** Waiting for unfinished jobs....
:info:build make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_x11_grace/grace/work/grace-5.1.22/src'

The change which prompted this upgrade was apparently a libpng bump:

Revision 97300, 2.2 KB (checked in by, 14 hours ago)
graphics/libpng upgraded to version 1.5.12, 232 dependent ports revision bumped due to library version number change
Apple clang version 4.0 (tags/Apple/clang-421.0.60) (based on LLVM 3.1svn)
Target: x86_64-apple-darwin12.1.0
Thread model: posix

grace is listed as "nomaintainer" so I cc'd the person who checked in this portfile revision. ryandesign is the libpng maintainer so he may be interested in this too.

Attachments (1)

grace-main.log.bz2 (7.3 KB) - added by angelo.graziosi@… 8 years ago.
the main log file

Download all attachments as: .zip

Change History (15)

comment:1 Changed 8 years ago by bcbarnes@…

for what it's worth, the povray port seems to have similar errors: this may be widespread after the libpng change. I will wait on opening a povray ticket.

Changed 8 years ago by angelo.graziosi@…

Attachment: grace-main.log.bz2 added

the main log file

comment:2 Changed 8 years ago by angelo.graziosi@…

The same occurs on Lion 10.7.4 and Xcode 4.4.1 with all command line tools installed.

comment:3 Changed 8 years ago by hapaguy (Brian Kurt Fujikawa)

Cc: brian.fujikawa@… added

Cc Me!

comment:4 Changed 8 years ago by mf2k (Frank Schima)

Keywords: grace libpng removed

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

Cc: jvianalopes@… added
Keywords: haspatch added

Duplicate #35962 has a link to a patch.

comment:6 Changed 8 years ago by dstaple@…

Cc: dstaple@… added

Cc Me!

comment:7 in reply to:  description Changed 8 years ago by dstaple@…

I am also experiencing this problem, using OS X 10.8.1 and Xcode 4.4.1.

The error also persists for different compilers. This isn't surprising considering that it's a libpng related error: Installing apple-gcc42 was a giant waste of time. (Thanks a lot, ProblemHotlist.) Anyway, all three of these fail in a similar fashion:

sudo port install grace
sudo port install grace configure.compiler=llvm-gcc-4.2
sudo port install grace configure.compiler=apple-gcc-4.2 configure.cxx=g++-apple-4.2

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

Owner: changed from macports-tickets@… to ryandesign@…
Status: newassigned

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

Resolution: fixed
Status: assignedclosed
Summary: grace build fail after libpng related changegrace: build fails with libpng 1.5

comment:10 Changed 8 years ago by dstaple@…

I am still getting the same error.

sudo port install grace


Error: Processing of port grace failed

The main log file looks the the same as before. Am I missing something?

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

Did you first run:

sudo port clean grace
sudo port selfupdate

If not, try that.

comment:12 in reply to:  11 ; Changed 8 years ago by dstaple@…

Yes, I did try

sudo port clean grace


sudo port selfupdate

although not necessarily in that order. I also tried uninstalling libpng (and the packages that depend on it) prior to installing grace, but that didn't help.

I uninstalled macports altogether and am now in the process of reinstalling. Maybe a stupid idea, but grace was the only package installed and I have to leave my computer for an hour shortly anyway.

comment:13 in reply to:  12 Changed 8 years ago by dstaple@…

Uninstalling and reinstalling macports did the job. I'm relieved that grace is working but frustrated that I wasted so much time uninstalling and reinstalling packages. Just bad luck that I upgraded my ports in the short window when grace was broken, and needed to use grace during that time.

Thanks for fixing it so quickly.

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

Perhaps also you selfupdated too quickly after the fix was committed. Fixes are only propagated from the Subversion repository to the rsync server every thirty minutes.

Note: See TracTickets for help on using tickets.