I'm developing a cgi program in C. I have a jail where run a http server and cgi. Server serves html and other files correctly.
The cgi program executes alone correctly, gives on stdout the correct output, but when I call the cgi from web client, I get "ELF interpreter /libexec/ld-elf.so.1 not found, error 2" error on stdout/stderr.
libexec/ld-elf.so.1 exists and is executable
I compile the cgi app with "clang -o cgi cgi.c" inside the jail. Host and jail are both x86_64 FreeBSD 12.2.
The webserver uses execl(cginame, cginame, (char*)NULL) to call the cgi.
I installed the http server and cgi on host (not jailed) and get the same error.
The cgi program executes alone correctly, gives on stdout the correct output, but when I call the cgi from web client, I get "ELF interpreter /libexec/ld-elf.so.1 not found, error 2" error on stdout/stderr.
libexec/ld-elf.so.1 exists and is executable
I compile the cgi app with "clang -o cgi cgi.c" inside the jail. Host and jail are both x86_64 FreeBSD 12.2.
The webserver uses execl(cginame, cginame, (char*)NULL) to call the cgi.
I installed the http server and cgi on host (not jailed) and get the same error.