Closed bugaev closed 4 years ago
Can't reproduce: test.asy.gz, test.eps.gz
…but you install asymptote form NixOS channel anyway, so Nixpkgs version shouldn't matter.
(and I could not reproduce the issue as reported with exact same store
path for asymptote
)
Maybe run asy -vvvv test.asy
and post the output?
@7c6f434c:
Hm. Maybe it runs out of memory? Could you try it inside nix-shell --pure
?
@7c6f434c: Could you please suggest how to run nix-shell? As an inexperienced user, I may be missing some crucial context to your advise.
I tried nix-shell --pure
as is and got this:
error: getting status of ‘/home/bugaev/PROG/ASYMPTOTE/default.nix’: No such file or directory`
Then I copied Asymptote's default.nix into the current dir: cp /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/pkgs/tools/graphics/asymptote/default.nix .
and tried nix-shell --pure
again.
This time I got the following error message:
error: cannot auto-call a function that has an argument without a default value (‘stdenv’)
nix-shell --pure -p asymptote --run "asy -vv test.asy"
@7c6f434c:
nix-shell --pure -p asymptote --run "asy -vv test.asy" results in test-pure.txt
Hm. Maybe try -offscreen
option to asy
. Also, it looks like your video card model and the driver you use are relevant.
@7c6f434c:
First, thank you for suggesting -offscreen
! I managed to produce my test.eps
.
Second, I upgraded the system (nix-channel --update nixos
and time nixos-rebuild switch
) and tried again. Details about my new system are at the bottom.
nix-shell --pure -p asymptote --run "asy -vvvv test.asy"
I still have the run-time error:
libGL error: unable to load driver: swrast_dri.so
libGL error: failed to load driver: swrast
freeglut (asy): ERROR: Internal error <FBConfig with necessary capabilities not found> in function fgOpenWindow
The last line seems like a consequence of the first two.
My glxgears
is working fine.
Well, I don't know how to debug complicated GL issues, but I think you could post some basic summary about your video card (model, kernel driver used, X driver used, DRI driver used). I mean, getting someone to reproduce the issue could make debugging simpler, and probably that requires having the same graphics setup.
@7c6f434c:
could post some basic summary about your video card
Thanks, here is a possibly incomplete information about my video system:
/etc/nixos/hardware-configuration.nix:
boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ]; boot.kernelModules = [ "kvm-intel" ];
/etc/nixos/configuration.nix:
services.xserver.videoDrivers = [ "nvidia" ];
I am not sure which other sources of information may be relevant.
Linux irene 4.9.58 #1-NixOS SMP Sat Oct 21 15:21:39 UTC 2017 x86_64 GNU/Linux
I'm running NixOS with nvidia (unstable), getting
freeglut (./result/bin/asy): ERROR: Internal error <FBConfig with necessary capabilities not found> in function fgOpenWindow
but no swrast errors – those would hint at bad configuration of LD_LIBRARY_PATH
or something similar.
I see you found a TORCS issue with similar enough symptoms…
I wonder if the root cause is that asymptote
uses normal linking to
Mesa instead of dlopen
.
@vcunat
I gave a try to echo $LD_LIBRARY_PATH
, got this:
/run/opengl-driver/lib
The contents of the above directory: opengl-driver-lib.txt
By the way, I didn't find swrast_dri.so
in it. May be this is a cause of the problem?
AFAIK nvidia's libGL isn't supposed to have or request swrast_dri
. That's what mesa does as a last-resort driver.
Does ls -l /run/opengl-driver/lib
really point to *nvidia-libs*
?
Actually, what happens if you run nix-shell --pure -p asymptote --run "LD_PRELOAD=/run/opengl-drive/lib/libGL.so asy -vv test.asy"
?
Ah, right, the opengl-driver contents above seems OK, but --pure
shell removes all variables, including LD_LIBRARY_PATH
. That makes the difference between our two errors, so "just" the FBConfig
line remains...
@vcunat
Does ls -l /run/opengl-driver/lib really point to nvidia-libs?
ls -l /run/opengl-driver/lib
/run/opengl-driver/lib -> /nix/store/hk7vdj5bi2v00f4xcpjyfn5hz4812jgd-nvidia-libs/lib
@7c6f434c
Actually, what happens if you run nix-shell --pure -p asymptote --run "LD_PRELOAD=/run/opengl-drive/lib/libGL.so asy -vv test.asy" ?
I tried this and the message about swrast_dri.so
is gone. FBConfig
error is still there: gl-preload.txt
Hm. And if you just run asy -vv test.asy -offscreen
, does it work now?
@7c6f434c:
Hm. And if you just run
asy -vv test.asy -offscreen
, does it work now?
It kinda works. In a message earlier I reported that it works, but after I tried it again, I realized that it may take 1, 2 or event 5 attempts to succeed with the command asy -vv test.asy -offscreen
.
Curiosly, only if the command succeeds in creating test.eps
, the message about freeglut pops up:
freeglut ERROR: Function
called without first calling 'glutInit'`
If the the command fails, there is no message about freeglut.
This makes me think that maybe freeglut thing is not really a reason for asy
failing to create output.
I start wondering if putting everything in /run/opengl-driver/lib
into LD_PRELOAD
is a bad idea to try…
@bugaev did you ever get this working? I'm experiencing the same issue and the suggestions above don't fix it.
nvm, updating asymptote fixes the issue. I'll have a PR for this shortly.
Thank you for your contributions. This has been automatically marked as stale because it has had no activity for 180 days. If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity. Here are suggestions that might help resolve this more quickly:
Closing this issue as I believe this has long since been resolved. Please reopen if you're still experiencing this with 2.65.
Issue description
Processing source files with Asymptote causes the following error message:
/nix/store/glmsg7w2vviw30868cca6m1cdymvxh3l-asymptote-2.41/share/asymptote/three.asy: 2905.13: runtime:
There is nothing after the colon inThe error condition is triggered by
draw((0,0,0)--(2,0,0), blue);
statement in the full listing of the input source file 'test.asy':Steps to reproduce
Technical details
Additional info