Opened 19 years ago

Closed 17 years ago

Last modified 15 years ago

#2716 closed defect (fixed)

BUG: transfig "fig2*" executables fail to build (xpm.h not found)

Reported by: briandg@… Owned by: ssen@…
Priority: Normal Milestone:
Component: ports Version: 1.0
Keywords: Cc:
Port:

Description

The four "fig2*" executables of the transfig port didn't build initially for me, though no errors were reported during the (normal) installation. (I succeeded in getting them to build eventually--see below.)

Doing a 'port -d install' yielded a few lines that caught my interest:

... ---> Building transfig with target all DEBUG: Executing com.apple.build (transfig) DEBUG: Assembled command: 'cd "/Users/bdg/Downloads/cvs/darwinports/dports/print/transfig/work/transfig.3.2.4" && make all' making all in ./fig2dev... rm -f fig2dev.o /usr/bin/cc -c -Os -Wall -Wpointer-arith -no-cpp-precomp -I.. -I/usr/X11R6/include -Dpowerpc -DDARWIN

-DNO_ALLOCA -DCSRG_BASED -DNFSS -DUSE_INLINE -DI18N -DUSE_PNG

-DUSE_XPM -I/opt/local/include -I/usr/include/X11 fig2dev.c In file included from fig2dev.c:29: object.h:20:17: xpm.h: No such file or directory In file included from fig2dev.c:29: object.h:158: error: parse error before "XpmImage" object.h:158: warning: no semicolon at end of struct or union object.h:168: error: parse error before '}' token (warnings snipped) make[1]: * [fig2dev.o] Error 1 ...

I do have xpm.h in /usr/X11R6/include/X11/. Looking around in the fig2dev Makefile, I notice this:

... # Change XPMLIBDIR if necessary to point to the xpm library (libXpm) # Change XPMINC if necessary to point to the include file for xpm (xpm.h) #

XPMLIBDIR = $(USRLIBDIR) XPMINC = -I/usr/include/X11 ...

(I don't even have a /usr/include/X11 directory...possibly because I have XFree86, not Apple's X11...?)

I successfully built transfig and the four fig2* executables by doing the following:

  1. started from scratch
  2. port [fetch, extract, configure] transfig
  3. Here I manually edited fig2dev/Makefile so that the faulty line quoted above

read:

XPMINC = -I/usr/X11R6/include/X11

  1. port [build, destroot, install] transfig

Voila, all five executables were built, destrooted, and installed.

(I tried fooling around in the patchfiles to see if I could offer an improved patch, but here unfortunately I came to the limit of my abilities.)

Change History (10)

comment:1 Changed 19 years ago by jmpp@…

The /usr/include/X11 dir installed by Apple's X11 is just a symlink:

$[juan@PowerBook(ttyp3): Documents](907/0,1)-> file /usr/include/X11 /usr/include/X11: symbolic link to `../X11R6/include/X11'

So, instead of going throug all trouble, why don't you just create a similar one that points to your XFree86's include dir? That will probably save you further trouble with other X11 ports that will likely fail the build stage in similar ways.

-jmpp

comment:2 Changed 19 years ago by briandg@…

Ah! Thanks for the info. That *is* a simple solution...but I sort of wonder if either the transfig port should try harder to find the X11 include dir, or if the XFree86_44 port should set up that symlink.... (to smooth the experience for future XFree86 users) ???

  • Brian

comment:3 Changed 19 years ago by jmpp@…

Owner: changed from darwinports-bugs@… to ssen@…

I'm not sure if the XFree86_44 port should install that link, but from what you describe it does look like it. I'm reassigning this bug to Shantonu, as he's the maintainer of the port and he'll be able to tell much better than me. About transfig "trying harder", I'm afraid not: it's using pretty standard paths so I believe the link should simply be there (as an example, Apple's X11 installs it)

In the mean time, if you need to build something else you can safely create it manually and then remove it in case Shantonu updates the port with this change and you reintall it.

Hope that helps!

-jmpp

comment:4 Changed 19 years ago by yves@…

I had a similar case with gimp2 configure

checking for XpmReadFileToXpmImage in -lXpm... yes checking X11/xpm.h usability... yes checking X11/xpm.h presence... no configure: WARNING: X11/xpm.h: accepted by the compiler, rejected by the preprocessor! configure: WARNING: X11/xpm.h: proceeding with the compiler's result checking for X11/xpm.h... yes

looking in configure

./configure:/usr/include/X11 ./configure:/usr/include/X11R6 ./configure:/usr/include/X11R5 ./configure:/usr/include/X11R4 ./configure:/usr/local/include/X11 ./configure:/usr/local/include/X11R6 ./configure:/usr/local/include/X11R5 ./configure:/usr/local/include/X11R4 ./configure:/usr/XFree86/include/X11

comment:5 Changed 19 years ago by ssen@…

I'm not sure I'm comfortable adding symlinks outside of ${prefix} and /usr/X11R6....

comment:6 Changed 19 years ago by snu@…

Summary: transfig "fig2*" executables fail to build (xpm.h not found)BUG: transfig "fig2*" executables fail to build (xpm.h not found)

Please use summary prefix.

comment:7 Changed 17 years ago by pipping@…

Milestone: Available Ports

comment:8 Changed 17 years ago by pipping@…

Milestone: Available PortsPort Bugs

comment:9 Changed 17 years ago by pguyot (Paul Guyot)

Resolution: fixed
Status: newclosed

As far as transfig is concerned, this is fixed with the 3.2.5 update (we now take xpm.h from /usr/X11R6/include/X11), and I think it should work with MP's XFree86 (although I didn't test, I don't have that many cycles to spare). I'm closing the bug, feel free to create a new one for other ports if required.

comment:10 Changed 15 years ago by (none)

Milestone: Port Bugs

Milestone Port Bugs deleted

Note: See TracTickets for help on using tickets.