Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#7319 closed defect (fixed)

gdmodule requires libiconv on cygwin

Reported by: mhansen Owned by: tbd
Priority: major Milestone: sage-4.4.1
Component: porting: Cygwin Keywords:
Cc: was Merged in: sage-4.4.1.alpha2
Authors: Mike Hansen Reviewers: David Kirkby, William Stein
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description

On Cywgin, the gdmodule spkg requires libiconv. I think we have two choices for handling this:

  1. Making sure that libiconv is always installed in the system Cygwin environment. We can probably have control over this if we include the Cygwin install with Sage.
  1. Add a libiconv spkg that is only installed if we are in Cygwin. Note that this would probably amount to including it in all source tarballs.

Once libiconv is present, we need to patch Setup.py in gdmodule to add libiconv to the list of required libraries.

I'll put up an spkg for libiconv and gdmodule here shortly.

Change History (18)

comment:1 Changed 10 years ago by mhansen

  • Cc was added; wstein removed
  • Status changed from new to needs_review
  • Summary changed from gdmodule requires libiconv on cygwin to [with spkg, needs review] gdmodule requires libiconv on cygwin

comment:2 Changed 10 years ago by mhansen

  • Authors set to Mike Hansen

comment:3 Changed 10 years ago by drkirkby

  • Report Upstream set to N/A

The latest version of R will need iconv on Solaris - currently an option to configure, something like --no-iconv is added on R. But iconv is mandatory on the latest version with Solaris. Given iconv is not large, and does not take long to build, I believe that is should be added. I would also suggest it is installed on all platforms - not just Cygwin and Solaris. It would give one more item which is fixed, and so less need to worry if someone's problem might be their version of iconv is too old or broken in some way.

Dave

comment:4 Changed 10 years ago by drkirkby

  • Reviewers set to David Kirkby
  • Status changed from needs_review to needs_work

Note, SPKG.txt has:

gdmodule-0.56.p5 (Mike Hansen, October 27th, 2009)

  • Make gdmodule work on Cygwin.

gdmodule-0.56.p5 (Michael Abshoff)

  • add .hgignore, SPKG.txt
  • clean up patches directory
  • build gdmodule against libpng12 instead of libpng (#5289)

with no entry for a p6 or p7. So this needs a bit of work, but even then, I'm unable to test on Cygwin, so you would need another reviewer too.

comment:5 Changed 10 years ago by drkirkby

As I stated above, R also needs iconv on Solaris now - the R developers have now disabled the option to not use iconv. I've created #8191 to create an iconv package. This seems the most logical way. I can't see any possible workaround with R.

Dave

comment:6 Changed 10 years ago by drkirkby

#8191 now has an iconv package, awaiting review, so there should be no need for Mike to create an iconv package.

comment:7 Changed 10 years ago by drkirkby

#8191 now has positive review, so iconv should soon be in Sage.

comment:8 Changed 10 years ago by drkirkby

Can this ticket be closed, given there is now an iconv package as a standard .spkg file in Sage?

dave

comment:9 Changed 10 years ago by mhansen

I'm not sure since the spkg here has other changes to it. I'll double check.

comment:10 Changed 10 years ago by mhansen

  • Status changed from needs_work to needs_review

There is an spkg at http://sage.math.washington.edu/home/mhansen/cygwin_port/gdmodule-0.56.p7.spkg that should be used. This still needs a review.

comment:11 Changed 10 years ago by drkirkby

Has this been tested on at least one Linux, Solaris and OS X system? There are quite a few non-trivial changes here, and I am aware iconv and gd have caused problems recently, so I think we need to be especially careful this is very well tested.

Dave

comment:12 Changed 10 years ago by mhansen

I've tested it on Cygwin and Linux. The only change is Cygwin-specific and does not happen on any other platform. The rest of the last commit was just checking in files to the repo that should have been but were not.

comment:13 Changed 10 years ago by was

  • Status changed from needs_review to positive_review

comment:14 Changed 10 years ago by was

  • Merged in set to 4.4.1.alpha2
  • Resolution set to fixed
  • Status changed from positive_review to closed

comment:15 Changed 10 years ago by mvngu

  • Summary changed from [with spkg, needs review] gdmodule requires libiconv on cygwin to gdmodule requires libiconv on cygwin

comment:16 Changed 10 years ago by mvngu

  • Reviewers changed from David Kirkby to David Kirkby, William Stein

comment:17 Changed 10 years ago by mvngu

  • Merged in changed from 4.4.1.alpha2 to sage-4.4.1.alpha2

comment:18 Changed 10 years ago by was

I'm having trouble with this on Cygwin now:

E_LIBFONTCONFIG -I/home/wstein/sage-4.4.3.alpha1/local/include -I/usr/include -I/usr/include/X11 -I/home/wstein/sage-4.4.3.al
 -c _gdmodule.c -o build/temp.cygwin-1.7.1-i686-2.6/_gdmodule.o
_gdmodule.c:152: warning: function declaration isn’t a prototype
_gdmodule.c:169: warning: function declaration isn’t a prototype
_gdmodule.c: In function ‘image_string’:
_gdmodule.c:993: warning: pointer targets in passing argument 5 of ‘gdImageString’ differ in signedness
_gdmodule.c: In function ‘image_string16’:
_gdmodule.c:1008: warning: passing argument 5 of ‘gdImageString16’ from incompatible pointer type
_gdmodule.c: In function ‘image_stringup’:
_gdmodule.c:1022: warning: pointer targets in passing argument 5 of ‘gdImageStringUp’ differ in signedness
_gdmodule.c: In function ‘image_stringup16’:
_gdmodule.c:1037: warning: passing argument 5 of ‘gdImageStringUp16’ from incompatible pointer type
gcc -shared -Wl,--enable-auto-image-base build/temp.cygwin-1.7.1-i686-2.6/_gdmodule.o -L/home/wstein/sage-4.4.3.alpha1/local/
1 -L/home/wstein/sage-4.4.3.alpha1/local/lib/python2.6/config -lgd -lpng12 -lz -lfreetype -liconv -lfontconfig -lpython2.6 -o
-2.6/_gd.dll
build/temp.cygwin-1.7.1-i686-2.6/_gdmodule.o: In function `write_file':
/home/wstein/sage-4.4.3.alpha1/spkg/build/gdmodule-0.56.p7/src/_gdmodule.c:248: undefined reference to `_gdImagePngPtr'
/home/wstein/sage-4.4.3.alpha1/spkg/build/gdmodule-0.56.p7/src/_gdmodule.c:250: undefined reference to `_gdImagePng'
build/temp.cygwin-1.7.1-i686-2.6/_gdmodule.o:_gdmodule.c:(.rdata+0x7e4): undefined reference to `_gdImageCreateFromPng'
build/temp.cygwin-1.7.1-i686-2.6/_gdmodule.o:_gdmodule.c:(.rdata+0x824): undefined reference to `_gdImageCreateFromPngCtx'
collect2: ld returned 1 exit status
error: command 'gcc' failed with exit status 1
Failure to build gdmodule

real    0m3.434s
user    0m0.760s
sys     0m1.991s
sage: An error occurred while installing gdmodule-0.56.p7

Note: See TracTickets for help on using tickets.