Talk:Native shebang: Difference between revisions
→Problems
(Example problem) |
|||
Line 59:
== Problems ==
The intro paragraph talks of a "third language" without identifying a second language (presumably the first language is the unix shell). Why? Is the "third language" a reference to the idea that C binaries are typically being "interpreted" by <code>ld.so</code>?
The C example doesn't work for me (unless a segmentation fault from script_gcc.sh can be described as "working" or a bad interpreter error from echo.c can be described as "working"). --[[User:Rdm|Rdm]] ([[User talk:Rdm|talk]]) 2014-03-24T01:45:49
Line 65:
:If you are sure it doesn't work then flag it as incorrect and put any extra info to help in recreating your problem here in the talk page. --[[User:Paddy3118|Paddy3118]] ([[User talk:Paddy3118|talk]]) 07:04, 26 September 2014 (UTC)
Here is what I get on OpenBSD (and OSX). Note that I obtained script_gcc.sh from the unix shell implementation as there was no such file defined in the C implementation.
<pre>$ chmod +x /usr/local/bin/script_gcc.c /usr/local/bin/script_gcc.sh echo.c; ./echo.c Hello, world
./echo.c: line 6: syntax error near unexpected token `('
./echo.c: line 6: `int main(int argc, char **argv, char **envp){'</pre>
So I think (a) the C implementation should include the script_gcc.sh file, since that is a part of what it needs to run at all, and (b) the implementation should be documented as being non-portable, and only working on Linux. The task description should probably also be changed to more thoroughly document this volume of code that an implementation might need. --[[User:Rdm|Rdm]] ([[User talk:Rdm|talk]]) 23:21, 13 July 2015 (UTC)
|