Re: problems with graphviz port and selfupdate

Ryan Schmidt <[email protected]> Tue, 29 Aug 2006 14:35:26 +0200
Newsgroups gmane.os.opendarwin.darwinports
Message-ID <[email protected]>
On Aug 29, 2006, at 07:48, Lisa Friedland wrote:

> I normally try to avoid compiling at all costs, so please excuse  
> whatever I shouldn't have done along the way in this saga.  I'm  
> posting first to document the errors and solutions I've found  
> (being grateful to previous reporters), and second to ask for  
> suggestions about the current "Bus error".
>
> Everything's running on OS 10.4 PPC G4.

Hi Lisa. I'll make some comments below, but since you say you'd like  
to avoid compiling anyway, please consider using my precompiled Mac  
OS X builds of Graphviz 2.9 here:

http://www.ryandesign.com/graphviz/


> 1) [Suggestion]
>
> I wanted to get a newer version of graphviz, so downloaded  
> darwinports to get it (v.2.8).  Running the programs (dot or neato)  
> from graphviz, I had the errors many people have seen (for instance  
> at http://www.graphviz.org/bugs/b891.html) when outputting certain  
> file types:
> "Error: fontconfig: Didn't find expected font family. Perhaps URW  
> Type 1 fonts need installing?"
>
> Distracted by those bug reports and workarounds, I had many false  
> starts before realizing the correct answer is actually to install  
> those URW Type 1 fonts.  Easiest way:
> port install urw-fonts
>
> In fact, I can't see why urw-fonts isn't listed as a dependency for  
> graphviz.  It needs to be installed first.

I believe Graphviz should not be requiring urw-fonts, but should  
rather work with the user's Mac OS X fonts. I do not know whether the  
MacPorts version of Graphviz works like this, but mine above does.


> 2) [Current issue, but probably a graphviz problem]
>
> Before passing step 1, I ended up with three different  
> installations of graphviz executables:
> an old version that comes with the Mac GUI, in /Applications/ 
> Graphviz.app/Contents/MacOS/
> a fink version in /sw/bin (which, if I remember right, had related  
> font errors and was an older version than in darwinports)
> the darwinports version in /opt/bin
> (and a local directory where I tried, but failed, to compile it  
> from source.)
>
> So when, after everything else was working I got a "Bus error" in  
> neato (the graphviz program I'm using), and saw something on the  
> web suggesting it could be from different versions getting linked  
> in together, I decided I'd better clean up everything.  I deleted  
> the fink version, took Graphviz.app out of my path, uninstalled all  
> packages in darwinports, and reinstalled them.
>
> Same problem: Bus error.
>
> Updating darwinports seemed like something to try.  But . . .
>
> 2) [Compile problem and solution]
>
> Running "port selfupdate", or downloading the source (DarwinPorts  
> 1.3.2) and trying to do the same, I first had a compile error about  
> TCL not being compiled with threads enabled.  I grabbed the  
> darwinports version of tcl tools, but these didn't have threads  
> enabled either.  To get around this, I found http:// 
> tcltkaqua.sourceforge.net/ and downloaded the current TclTkAqua  
> distribution (8.4.10).  It's precompiled and did turn out to have  
> threads enabled.  Hooray.
>
> (The darwinports .dmg's (v.1.2 and v.1.3) seemed to install fine,  
> but I imagine the problem would surface on a selfupdate.)

I've never heard of any such problem with tcl. I didn't have to do  
anything unusual to install DarwinPorts on my Mac, which also runs  
Mac OS X 10.4 on a PPC G4.


> 3) [Compile problem and hacked solution]
>
> Running "port selfupdate" or compiling darwinports from source,  
> this next error followed:
> ===> making all in src/pextlib1.0
> gcc -c -DUSE_TCL_STUBS -g -O2 -W -Wall -pedantic -g -Os - 
> DHAVE_CONFIG_H -I.. -I.  -I"/usr/include"  -DHAVE_UNISTD_H=1 - 
> DHAVE_LIMITS_H=1 -DTCL_WIDE_INT_TYPE=long\ long -DWORDS_BIGENDIAN=1  
> -DHAVE_GETCWD=1 -DHAVE_OPENDIR=1 -DHAVE_STRSTR=1 -DHAVE_STRTOL=1 - 
> DHAVE_STRTOLL=1 -DHAVE_STRTOULL=1 -DHAVE_TMPNAM=1 -DHAVE_WAITPID=1 - 
> DNO_VALUES_H=1 -DNO_DLFCN_H=1 -DHAVE_UNISTD_H=1 - 
> DHAVE_SYS_PARAM_H=1 -DUSE_TERMIOS=1 -DHAVE_SYS_TIME_H=1 - 
> DTIME_WITH_SYS_TIME=1 -DHAVE_TM_ZONE=1 -DHAVE_GMTIME_R=1 - 
> DHAVE_LOCALTIME_R=1 -DHAVE_TM_GMTOFF=1 -DHAVE_ST_BLKSIZE=1 - 
> DSTDC_HEADERS=1 -Dsocklen_t=unsigned -DHAVE_SIGNED_CHAR=1 - 
> DHAVE_PUTENV_THAT_COPIES=1 -DHAVE_SYS_IOCTL_H=1 - 
> DHAVE_SYS_FILIO_H=1  -fno-common Pextlib.c -o Pextlib.o
> In file included from Pextlib.c:96:
> /usr/include/sys/socket.h:99: error: two or more data types in  
> declaration specifiers
> make[2]: *** [Pextlib.o] Error 1
> make[1]: *** [all] Error 1
> make: *** [all] Error 1
>
> FYI, I updated XCode at this point (from 2.0 to 2.4), which neither  
> seems to have helped or hurt the matter.
>
> Poking around randomly, I came up with the following fix, which  
> solved it (but is probably not "the right" thing to do):
> In the file DarwinPorts-1.3.2/Mk/dports.autoconf.mk, edit the  
> TCL_DEFS in line 10.  Delete the flag "-Dsocklen_t=unsigned".  Then  
> rerun "make" from the top directory.

I've never seen any such error either.


> Everything's dandy now except for that "bus error."  I'm  
> suspecting, since I've only seen it with unusually large files,  
> that it's actually a graphviz issue.  Unless anyone can think of a  
> way I could have multiple libraries mixed in together (or  
> something) at this point.

If the problem only occurs for large graphs, depending on what  
"large" means, then it may simply be too much for Graphviz to handle.  
Please try my build above and see if you get the same problem with  
your large files, but if you do, and if you are able to render  
smaller files, then that's probably it. But I encourage you to come  
over to the graphviz-interest list and discuss it there as well:

https://mailman.research.att.com/mailman/listinfo/graphviz-interest