Hello, I'm having trouble with nekoml on FreeBSD 9.0-CURRENT.
nekoml runs fine from my usual interactive shell (zsh), but fails with "Uncaught exception - load.c(176): Module not found : ..." when run from /bin/sh. I've run into this behavior trying to build hss (http://www.ncannasse.fr/projects/hss): the first thing done by the Makefile is "nekoml hss/*.nml" which fails with the above error, indicating Ast.nml (the first file in the expansion of the glob pattern). I've tried to pinpoint the source of the problem. Grepping through the neko sources didn't reveal anything obvious, so I wrote a trivial execve(2) wrapper, and it reproduces the behavior: // fork & execve #include <sys/types.h> #include <unistd.h> // waitpid #include <sys/wait.h> // abort #include <stdlib.h> // fprintf #include <stdio.h> // assert #include <assert.h> int main(int argc, char** argv, char** envp) { if (3 > argc) { fprintf(stderr, "Usage: argv <cmd> <arg> [<arg> ...]\n"); return 1; } pid_t pid = fork(); if (0 > pid) abort(); if (0 == pid) { execve(argv[1], &argv[1], envp); return 2; } int ex = 0; waitpid(pid, &ex, 0); assert(WIFEXITED(ex)); return WEXITSTATUS(ex); } % $(which nekoml) hss/Ast.nml # generates hss/Ast.n % gcc -o wrap wrap.c % ./wrap $(which nekoml) hss/Ast.nml # generates the familiar error The environment is the same in my interactive shell and the wrapper. Maybe nekoml does something out-of-ordinary with file descriptors? I'm out of my league here. TIA for any help! -- Roman Neuhauser -- Neko : One VM to run them all (http://nekovm.org)
