Ticket #12997 (closed defect: fixed)

Opened 9 months ago

Last modified 3 months ago

tiff won't build with Leopard

Reported by: tannhaus@gmail.com Assigned to: waqar@macports.org
Priority: Normal Milestone: Port Bugs
Component: ports Version: 1.5.2
Keywords: Cc: tannhaus@gmail.com, afb@macports.org, davidc1947@mac.com

Description

I keep trying to build tiff in order to install wine. It fails with the following:

libtool: link: creating tiffsplit if /usr/bin/gcc-4.0 -DHAVE_CONFIG_H -I. -I. -I../libtiff -I../libtiff -I../libtiff -I/opt/local/include -I/opt/local/include -I/opt/local/include -O2 -Wall -W -O2 -Wall -W -MT tiffgt-tiffgt.o -MD -MP -MF ".deps/tiffgt-tiffgt.Tpo" -c -o tiffgt-tiffgt.o test -f 'tiffgt.c' || echo './'tiffgt.c; \

then mv -f ".deps/tiffgt-tiffgt.Tpo" ".deps/tiffgt-tiffgt.Po"; else rm -f ".deps/tiffgt-tiffgt.Tpo"; exit 1; fi

tiffgt.c: In function 'raster_keys': tiffgt.c:303: warning: unused parameter 'x' tiffgt.c:303: warning: unused parameter 'y' tiffgt.c: In function 'raster_special': tiffgt.c:348: warning: unused parameter 'x' tiffgt.c:348: warning: unused parameter 'y' /bin/sh ../libtool --tag=CC --mode=link /usr/bin/gcc-4.0 -O2 -Wall -W -L/opt/local/lib -L/opt/local/lib -L/opt/local/lib -o tiffgt tiffgt-tiffgt.o ../libtiff/libtiff.la ../port/libport.la -L/usr/X11/lib -framework GLUT -lobjc -framework OpenGL -ljpeg -lz -lc libtool: link: /usr/bin/gcc-4.0 -O2 -Wall -W -o .libs/tiffgt tiffgt-tiffgt.o -L/opt/local/lib ../libtiff/.libs/libtiff.dylib ../port/.libs/libport.a -L/usr/X11/lib -framework GLUT -lobjc -framework OpenGL /opt/local/lib/libjpeg.dylib -lz -lc ld: cycle in dylib re-exports with /usr/X11/lib/libGL.dylib collect2: ld returned 1 exit status make[1]: *** [tiffgt] Error 1 make: *** [all-recursive] Error 1

Warning: the following items did not execute (for tiff): org.macports.activate org.macports.build org.macports.destroot org.macports.install Error: Status 1 encountered during processing.

Change History

2007-10-26 20:29:43 changed by ryandesign@macports.org

  • cc set to tannhaus@gmail.com, waqar@macports.org.
  • owner changed from macports-dev@lists.macosforge.org to waqar@macports.org.
  • milestone set to Port Bugs.

2007-10-26 23:57:34 changed by afb@macports.org

/bin/sh ../libtool --tag=CC --mode=link gcc  -O2 -Wall -W  -L/opt/local/lib -L/opt/local/lib -L/opt/local/lib -o tiffgt  tiffgt-tiffgt.o ../libtiff/libtiff.la ../port/libport.la -L/usr/X11/lib -framework GLUT -lobjc -framework OpenGL -ljpeg -lz -lc 

Apparently you can't use both -L/usr/X11/lib and -framework OpenGL, when on Leotard...

Removing the useless (for --with-apple-opengl-framework) -L/usr/X11/lib makes it compile OK.

2007-10-27 00:03:57 changed by afb@macports.org

platform macosx {
    configure.args-append   --with-apple-opengl-framework
    post-configure { reinplace "s,-L/usr/X11/lib,," ${worksrcpath}/tools/Makefile }
}

2007-10-27 00:15:10 changed by tannhaus@gmail.com

That doesn't appear to work either. I get the following:

Error: Target org.macports.configure returned: reinplace ?-E? pattern file ...

2007-10-27 00:18:41 changed by tannhaus@gmail.com

I take that back. It was a copy and paste error on my part.

platform macosx {

configure.args-append --with-apple-opengl-framework post-configure { reinplace "s,-L/usr/X11/lib" ${worksrcpath}/tools/Makefile }

}

does indeed work. It compiles fine now. Thank you.

2007-10-27 02:20:11 changed by akb@the-ocean.co.uk

same issue as original ticket; have applied change to port file; still fails to compile at same place:

--->  Cleaning jpeg
--->  Fetching tiff
--->  Attempting to fetch tiff-3.8.2.tar.gz from ftp://ftp.remotesensing.org/pub/libtiff/
--->  Verifying checksum(s) for tiff
--->  Extracting tiff
--->  Configuring tiff
--->  Building tiff with target all
Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_graphics_tiff/work/tiff-3.8.2" && make all " returned error 2
Command output: libtool: link: creating tiffinfo
if gcc -DHAVE_CONFIG_H -I. -I. -I../libtiff -I../libtiff -I../libtiff  -I/opt/local/include -I/opt/local/include -I/opt/local/include  -O2 -Wall -W -MT tiffmedian.o -MD -MP -MF ".deps/tiffmedian.Tpo" -c -o tiffmedian.o tiffmedian.c; \
	then mv -f ".deps/tiffmedian.Tpo" ".deps/tiffmedian.Po"; else rm -f ".deps/tiffmedian.Tpo"; exit 1; fi
/bin/sh ../libtool --tag=CC --mode=link gcc  -O2 -Wall -W  -L/opt/local/lib -L/opt/local/lib -L/opt/local/lib -o tiffmedian  tiffmedian.o ../libtiff/libtiff.la ../port/libport.la -ljpeg -lz -lc 
libtool: link: gcc -O2 -Wall -W -o .libs/tiffmedian tiffmedian.o  -L/opt/local/lib ../libtiff/.libs/libtiff.dylib ../port/.libs/libport.a /opt/local/lib/libjpeg.dylib -lz -lc
libtool: link: creating tiffmedian
if gcc -DHAVE_CONFIG_H -I. -I. -I../libtiff -I../libtiff -I../libtiff  -I/opt/local/include -I/opt/local/include -I/opt/local/include  -O2 -Wall -W -MT tiffset.o -MD -MP -MF ".deps/tiffset.Tpo" -c -o tiffset.o tiffset.c; \
	then mv -f ".deps/tiffset.Tpo" ".deps/tiffset.Po"; else rm -f ".deps/tiffset.Tpo"; exit 1; fi
/bin/sh ../libtool --tag=CC --mode=link gcc  -O2 -Wall -W  -L/opt/local/lib -L/opt/local/lib -L/opt/local/lib -o tiffset  tiffset.o ../libtiff/libtiff.la ../port/libport.la -ljpeg -lz -lc 
libtool: link: gcc -O2 -Wall -W -o .libs/tiffset tiffset.o  -L/opt/local/lib ../libtiff/.libs/libtiff.dylib ../port/.libs/libport.a /opt/local/lib/libjpeg.dylib -lz -lc
libtool: link: creating tiffset
if gcc -DHAVE_CONFIG_H -I. -I. -I../libtiff -I../libtiff -I../libtiff  -I/opt/local/include -I/opt/local/include -I/opt/local/include  -O2 -Wall -W -MT tiffsplit.o -MD -MP -MF ".deps/tiffsplit.Tpo" -c -o tiffsplit.o tiffsplit.c; \
	then mv -f ".deps/tiffsplit.Tpo" ".deps/tiffsplit.Po"; else rm -f ".deps/tiffsplit.Tpo"; exit 1; fi
/bin/sh ../libtool --tag=CC --mode=link gcc  -O2 -Wall -W  -L/opt/local/lib -L/opt/local/lib -L/opt/local/lib -o tiffsplit  tiffsplit.o ../libtiff/libtiff.la ../port/libport.la -ljpeg -lz -lc 
libtool: link: gcc -O2 -Wall -W -o .libs/tiffsplit tiffsplit.o  -L/opt/local/lib ../libtiff/.libs/libtiff.dylib ../port/.libs/libport.a /opt/local/lib/libjpeg.dylib -lz -lc
libtool: link: creating tiffsplit
if gcc -DHAVE_CONFIG_H -I. -I. -I../libtiff -I../libtiff -I../libtiff  -I/opt/local/include -I/opt/local/include -I/opt/local/include -O2 -Wall -W   -O2 -Wall -W -MT tiffgt-tiffgt.o -MD -MP -MF ".deps/tiffgt-tiffgt.Tpo" -c -o tiffgt-tiffgt.o `test -f 'tiffgt.c' || echo './'`tiffgt.c; \
	then mv -f ".deps/tiffgt-tiffgt.Tpo" ".deps/tiffgt-tiffgt.Po"; else rm -f ".deps/tiffgt-tiffgt.Tpo"; exit 1; fi
tiffgt.c: In function 'raster_keys':
tiffgt.c:303: warning: unused parameter 'x'
tiffgt.c:303: warning: unused parameter 'y'
tiffgt.c: In function 'raster_special':
tiffgt.c:348: warning: unused parameter 'x'
tiffgt.c:348: warning: unused parameter 'y'
/bin/sh ../libtool --tag=CC --mode=link gcc  -O2 -Wall -W  -L/opt/local/lib -L/opt/local/lib -L/opt/local/lib -o tiffgt  tiffgt-tiffgt.o ../libtiff/libtiff.la ../port/libport.la -L/usr/X11/lib -framework GLUT -lobjc -framework OpenGL -ljpeg -lz -lc 
libtool: link: gcc -O2 -Wall -W -o .libs/tiffgt tiffgt-tiffgt.o  -L/opt/local/lib ../libtiff/.libs/libtiff.dylib ../port/.libs/libport.a -L/usr/X11/lib -framework GLUT -lobjc -framework OpenGL /opt/local/lib/libjpeg.dylib -lz -lc
ld: cycle in dylib re-exports with /usr/X11/lib/libGL.dylib
collect2: ld returned 1 exit status
make[1]: *** [tiffgt] Error 1
make: *** [all-recursive] Error 1

2007-10-27 06:25:39 changed by sd@notso.net

The fix worked for me

2007-10-27 08:50:33 changed by akb@the-ocean.co.uk

Just tried the fix again - worked this time. Great Cheers,

2007-10-28 14:10:48 changed by afb@macports.org

Patch applied in r30466.

2007-10-30 09:33:51 changed by afb@macports.org

  • status changed from new to closed.
  • resolution set to fixed.

2007-12-27 08:14:04 changed by ryandesign@macports.org

  • cc changed from tannhaus@gmail.com, waqar@macports.org to tannhaus@gmail.com, waqar@macports.org, afb@macports.org.

The fix does not appear to work for everyone; the problem has been re-reported in #13683.

2007-12-27 08:32:55 changed by afb@macports.org

  • status changed from closed to reopened.
  • resolution deleted.

Need a better workaround, instead of hack above.

http://developer.apple.com/qa/qa2007/qa1567.html

configure.ldflags.append \
-dylib_file \
/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:\
/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib

2008-03-11 07:22:13 changed by jmr@macports.org

  • cc changed from tannhaus@gmail.com, waqar@macports.org, afb@macports.org to tannhaus@gmail.com, afb@macports.org, davidc1947@mac.com.

Cc reporter of duplicate #14392.

2008-04-28 16:51:22 changed by jmr@macports.org

The better fix doesn't seem to have ever been checked in. Any reason it shouldn't be?

2008-05-07 06:08:51 changed by jmr@macports.org

  • status changed from reopened to closed.
  • resolution set to fixed.

Applied in r36600.