You are not logged in.

#1 2012-03-20 15:14:59

djraymondnm
Member
From: Socorro, NM, USA
Registered: 2011-12-28
Posts: 59
Website

Problems with xfig and alternative drawing programs

The current xfig on Arch (xfig 3.2.5b-7) does not display lines of greater than default width
correctly; typically, somewhat random segments of these lines are shown and redrawing
does not help.  Upstream support for xfig seems to be weak at this point, and xfig seems
to be dying a slow death.  Some of this may be due to changes in the xaw3d packages on
which xfig depends.

I am therefore seeking an alternative program to make scientific diagrams.  I need lines of varying
widths, lines with arrows, arcs, circles, ellipses, polygons filled and unfilled, and text,
including especially Greek letters.  Possibilities I have found are:

1. Dia: Simple but doesn't do Greek text or text which can be rotated.  Dia has  alternative
input modes, some of which yield characters in obscure languages, but no Greek alphabet!
This seems very strange to me.  In Community repository.

2. Inkscape: This tool can do everything desired, but it has a very steep learning curve and
stuff that should be simple isn't.  (Try making multiple lines with arrow heads!)
Greek text can be inserted if one knows the unicode values by typing ^U followed by the unicode.
In Extra repository.

3. Tgif: This gem of a program does everything I need but I suspect that it is under-appreciated.
It has very few dependencies and the original developer still maintains it.  Development has
slowed almost to a halt, but I have used it quite a bit recently and have not found any bugs
or missing features of a serious nature.  Currently it is in the AUR.

So, I would like to try to raise the visibility of tgif to see if there is enough interest to get it
included in the Arch Community repository.  Any interest?

Offline

#2 2012-03-20 16:05:15

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Problems with xfig and alternative drawing programs

I'm getting an error when trying to compile tgif:

...
/usr/bin/ld: inmethod.o: undefined reference to symbol 'dlopen@@GLIBC_2.1'
/usr/bin/ld: note: 'dlopen@@GLIBC_2.1' is defined in DSO /lib/libdl.so.2 so try adding it to the linker command line
/lib/libdl.so.2: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
make: *** [tgif] Error 1
==> ERROR: A failure occurred in build().
    Aborting...

Seems similar to https://bbs.archlinux.org/viewtopic.php?id=137876

Offline

#3 2012-03-20 17:20:32

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: Problems with xfig and alternative drawing programs

Yes it is similar, and very easy to fix. See my comment on AUR comment page of tgif.

Offline

#4 2012-03-20 17:37:51

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Problems with xfig and alternative drawing programs

Thanks, that fixed it.

This is a tiny package and compiles instantly so even if it stays in the AUR, everyone can easily compile it themselves.

Another speedbump:

[karol@black ~]$ tgif
Fatal Error in OpenFont(): Cannot open the Default(Msg)Font '-*-courier-medium-r-normal-*-14-*-*-*-*-*-iso8859-1'.
Tgif aborted.

I guess I have to edit /usr/lib/X11/tgif/tgif.Xdefaults.

Offline

#5 2012-03-20 18:07:01

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: Problems with xfig and alternative drawing programs

Happens here, too. djraymondnm, do you have a working Xdefaults?

Offline

#6 2012-03-20 21:03:50

djraymondnm
Member
From: Socorro, NM, USA
Registered: 2011-12-28
Posts: 59
Website

Re: Problems with xfig and alternative drawing programs

I actually compiled tgif from source obtained from the upstream site

http://bourbon.usc.edu/tgif/index.html

following the author's install instructions, which are basically

    xmkmf
    make tgif
    make install

Everything worked flawlessly.  However, I installed all of the X11 metapackages
which are presented as choices on the initial install of Arch, so I presumably have
the font needed by tgif on startup.

The Xdefaults file for tgif from this install is completely commented out and tgif
is supposed to run just fine without it (presuming that the right fonts are installed)
according to the author.

Offline

#7 2012-03-20 21:21:07

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Problems with xfig and alternative drawing programs

I know that installing xorg-fonts-100dpi or xorg-fonts-75dpi fixes it, but I'd prefer to use the fonts I already have.

I think these fonts should be added as depends to the PKGBUILD from the AUR https://aur.archlinux.org/packages.php?ID=22996 , like they were added to the xboard PKGBUILD: http://projects.archlinux.org/svntogit/ … 46ce653564 (otherwise you got the same error about missing default fonts).

The tgif PKGBUILD also has '|| return 1' which is not necessary anymore.


Anything else? I'd like someone (Stefan? ;P) to post an updated PKGBUILD in the comments on tgif's AUR page, but I'm not sure if we got all the issues with the current PKGBUILD covered.

Last edited by karol (2012-03-20 21:22:40)

Offline

#8 2012-03-20 23:02:34

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: Problems with xfig and alternative drawing programs

I posted a revised  PKGBUILD to here and made an AUR comment. I also wrote a mail to the maintainer. I suspect a bit he or she is inactive. All of his or her PKGBUILDs are a bit old fashioned.

Offline

#9 2012-03-20 23:12:55

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Problems with xfig and alternative drawing programs

Stefan Husmann wrote:

I posted a revised  PKGBUILD to here and made an AUR comment. I also wrote a mail to the maintainer. I suspect a bit he or she is inactive. All of his or her PKGBUILDs are a bit old fashioned.

Thanks :-)
I know you have quite a few packages in the AUR and I have no experience in writing PKGBUILDs nor with compiling stuff so I wasn't sure I got it right.


You removed some dependencies presumably because glibc is in the base group and libxt depends on libx11 so there's no need to specify libx11 as a dependency separately.
Why did you keep the zlib dependency? I know it doesn't hurt, but zlib is a dependency for the 'file' package and file is in the base group so I think everyone's expected to have zlib installed.

Offline

#10 2012-03-20 23:31:20

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: Problems with xfig and alternative drawing programs

I removed some deps because they were already satisfied  by other deps. I simply overlooked that zlib fell into the same kind of dep. It can be dropped also.

Offline

#11 2012-03-20 23:59:07

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Problems with xfig and alternative drawing programs

Heh, I've noticed that some dependencies weren't needed only after you removed them + I forgot to add that the 'package()' part was needed :-)

Offline

#12 2012-03-21 06:42:44

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: Problems with xfig and alternative drawing programs

It comes out, that having the xorg-fonts installed does not solve the problem for me. Still getting

Fatal Error in OpenFont(): Cannot open the Default(Msg)Font '-*-courier-medium-r-normal-*-14-*-*-*-*-*-iso8859-1'.
Tgif aborted.

Offline

#13 2012-03-21 11:49:08

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Problems with xfig and alternative drawing programs

You need to restart X.
Works for me.

Offline

#14 2012-03-21 14:34:17

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: Problems with xfig and alternative drawing programs

Yes, that did the trick for me, too.

Offline

#15 2012-03-21 14:44:45

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Problems with xfig and alternative drawing programs

The PKGBUILD has been updated but the maintainer kept the old dependencies ;P and orphaned the package.

Offline

#16 2012-03-21 15:43:25

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: Problems with xfig and alternative drawing programs

I am in mail contact with him. I'll see.

Offline

#17 2012-03-21 18:26:24

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: Problems with xfig and alternative drawing programs

The PKGBUILD was adopted and again revised.

Offline

#18 2012-03-21 18:28:54

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Problems with xfig and alternative drawing programs

Thanks :-)

Offline

Board footer

Powered by FluxBB