asymptote issue

System: openSUSE 12.3_x86_64_DVD (KDE)
Package: texlive-asymptote (version 2.16)
Repository: http://download.opensuse.org/repositories/Publishing:/TeXLive/openSUSE_12.3/
Description: After installing asymptote from the texlive repository, it fails to run from the console (output post-scripted).
Workaround: Compiling asymptote (version 2.21) from source: http://sourceforge.net/projects/asymptote/


sh-4.2$ asy
Welcome to Asymptote version 2.16 (to view the manual, type help)
/usr/lib/texmf/asymptote/plain_strings.asy: 213.16: no matching function 'format(<overloaded>, real, <overloaded>)'
/usr/lib/texmf/asymptote/plain_strings.asy: 213.17: use of variable 'defaultformat' is ambiguous
/usr/lib/texmf/asymptote/plain_strings.asy: 213.33: use of variable 'locale' is ambiguous
/usr/lib/texmf/asymptote/plain_markers.asy: 317.19: no matching function 'format(<overloaded>, real)'
/usr/lib/texmf/asymptote/plain_markers.asy: 317.20: use of variable 'format' is ambiguous
/usr/lib/texmf/asymptote/plain_markers.asy: 317.42: no matching function 'format(<overloaded>, real)'
/usr/lib/texmf/asymptote/plain_markers.asy: 317.43: use of variable 'format' is ambiguous
/usr/lib/texmf/asymptote/plain.asy: 261.9: use of variable 'file' is ambiguous
/usr/lib/texmf/asymptote/plain.asy: 262.15: no matching function 'format(<overloaded>, real)'
/usr/lib/texmf/asymptote/plain.asy: 262.16: use of variable 'format' is ambiguous
/usr/lib/texmf/asymptote/plain.asy: 263.15: no matching function 'format(<overloaded>, real)'
/usr/lib/texmf/asymptote/plain.asy: 263.16: use of variable 'format' is ambiguous
/usr/lib/texmf/asymptote/plain.asy: 264.15: no matching function 'format(<overloaded>, real)'
/usr/lib/texmf/asymptote/plain.asy: 264.16: use of variable 'format' is ambiguous
/usr/lib/texmf/asymptote/plain.asy: 265.15: no matching function 'format(<overloaded>, real)'
/usr/lib/texmf/asymptote/plain.asy: 265.16: use of variable 'format' is ambiguous
error: recursive loading of module 'plain'
sh-4.2$

I tried what you said, but I am still having problems. If I try to do a 3d plot, I get a division by 0 error.

The code I am trying to use to create a graph is directly from the Asymptote documentation.

import three;
currentprojection=orthographic(5,4,2,center=true);
size(5cm);
size3(3cm,5cm,8cm);
draw(unitbox);
dot(unitbox,red);
label("$O$",(0,0,0),NW);
label("(1,0,0)",(1,0,0),S);
label("(0,1,0)",(0,1,0),E);
label("(0,0,1)",(0,0,1),Z);

The error is given at the

draw(unitbox);

command. This is what I get.


>/home/Asymptote/asymptote-2.21 # ./asy
Welcome to Asymptote version 2.21 (to view the manual, type help)
> import three;
> currentprojection=orthographic(5,4,2,center=true);
> size(5cm);
> size3(3cm,5cm,8cm);
> draw(unitbox);
/usr/local/share/asymptote/plain_shipout.asy> : 39.3: runtime: division by 0 in transform of a triple
terminate called after throwing an instance of 'handled_error'
Aborted

Can you give me any help?

Apologies for the delay in replying (I didn’t expect any responses to my post). I cannot replicate your error. I strongly suspect you still have the bugged version of Asymptote installed (tex-asymptote). Either this is because you haven’t uninstalled the binary (more likely) or because you haven’t compiled Asymptote (less likely). You need to remove the old version, install depencies, then install from source:


sh-4.2$ su 
sh-4.2$ zypper ar -f http://download.opensuse.org/repositories/Publishing:/TeXLive/openSUSE_12.3/ "texlive"
sh-4.2$ zypper rm texlive-asymptote
sh-4.2$ zypper in gcc make kernel-devel gc-devel zlib-devel gv
sh-4.2$ tar fxz asymptote-2.21.src.tgz 
sh-4.2$ cd asymptote-2.21/
sh-4.2$ ./configure
sh-4.2$ make
sh-4.2$ make install
sh-4.2$ exit

… paying particular attention to any errors. I recall having to manually create a symbolic link to the binary executable to be accessible to all users (not just root).

Sorry, but I gave up when I found it was a flaw in the TeX packaging and the compilation. I reported it in bugzilla, but there were other things to do. I am running a fedora VM when I think about asymptote and I am only now thinking of trying again.

Thank you for trying.

On 2013-09-04, jaytreiman <jaytreiman@no-mx.forums.opensuse.org> wrote:
> Sorry, but I gave up when I found it was a flaw in the TeX packaging and
> the compilation. I reported it in bugzilla, but there were other things
> to do. I am running a fedora VM when I think about asymptote and I am
> only now thinking of trying again.

I have no idea if Asymptote works within a VM, and I’d strongly advise against this appoach especially for intensive 3D
tasks. Asymptote uses OpenGL rendering and relies on graphics card hardware; it is susceptible to artefacts and the
authors are very quick to blame graphics card issues for this problem.

The texlive packaging in openSUSE is borked. Apparently this is entirely due to Asymptote’s rpm binary, which everyone
knows is broken anyway; it should be removed until it is fixed in my opion. Hopefully texlive may be fixed before
openSUSE 13.1, but I wouldn’t hold your breath because it doesn’t affect many people. In the meantime you could save
yourself a lot of time and trouble by investing in the 3 minutes it takes to install Asymptote from source.

Installing from Asymptote source will not work for what I need since TeXlive for 12.3 is from before July 2012. You cannot run
the media9 package on 12.3 without replacing the entire TeXlive installation.

On 2013-09-19, jaytreiman <jaytreiman@no-mx.forums.opensuse.org> wrote:
> Installing from Asymptote source will not work for what I need since
> TeXlive for 12.3 is from before July 2012.

The TeXLive version for openSUSE is irrelevant - it’s the version you don’t install. I have Asymptote happily running on
openSUSE 12.3 by installing from source code directly from SourceForge’s website.

> You cannot run
> the media9 package on 12.3 without replacing the entire TeXlive
> installation.

Installing Asymptote from source has nothing to do with TeXLive.