0

I have unpacked gwan server, put a basic hello world file in a listener and tried to run it, however gwan won't run C scripts and claims that "ANSI C" is not installed:

$ ./gwan
 

allowed sockets: 1024 ('sudo ./gwan' to let G-WAN use more sockets)

loading
             index.c: to use    .c scripts, install ANSI C..



_________________________________________________________________
|                                                               |
| G-WAN Web App. Server v7.12.6   64-bit (Feb  8 2016 16:33:28) |
|_______________________________________________________________|

I have installed "Development Tools" and "Development Libraries" package groups, and gwan detects gcc 12.1.1. In gwan log I see:

[Sat Jul 23 07:21:08 2022 GMT] gcc version 12.1.1 20220507
[Sat Jul 23 07:21:08 2022 GMT] minify:n caches: query_char:? default_lang:ANSI C

I checked if similar problem will be with other scripts, but python and lua scripts run fine.

Just to be sure that development toolchain works I have checked if I can compile simple hello world program using gcc alone and it was successful. I also built and installed weighttp from source files, and it runs correctly.

I also read through gwan faq but didn't find similar issue described there.

I suspect some kind of package or environment variable is missing on my OS. Any suggestions what could be the issue?

Anastazy
  • 4,624
  • 2
  • 13
  • 22
  • 1
    C is not a scripting language. C files don't run through an interpreter, they are compiled into executable program which then can be run. No idea what gwan is, but there seems to be some terminology funniness with the phrase *"To use .c scripts"*. It may make sense to gwan, but makes no sense to me. You could take a file containing `#include ; int main() { puts ("Hello World"); }` save it as `file.c` and then `gcc file.c` and type `./a.out` to run the default named executable. That will convert the ANSI C into the executable `a.out`. – David C. Rankin Jul 23 '22 at 08:51
  • In `#include ; `, you would need to make the `';'` a `'\n'` to have it compile. – David C. Rankin Jul 23 '22 at 08:57
  • @DavidC.Rankin G-WAN will automatically compile and reload C programs every time you change them during development, it requires gcc as dependency, which I have installed. A "script" is _n. 1. A writing; a written document_. http://webster-dictionary.net/definition/script so that term to me is perfectly correct. – Anastazy Jul 23 '22 at 09:10
  • @DavidC.Rankin By the way thank you for your comments, I have added some more info in the description and reworded the question slightly so hopefully it is easier to understand what's the issue here. – Anastazy Jul 23 '22 at 12:50
  • @Anastazy Terms in computing do not always match every general-language sense. I suppose you know that. That particular dictionary site isn't really a great general English reference either — it's based on the _1913_ Webster's dictionary. In any case, the relevant thing here is that the G-WAN software you want to use calls its ... things ... "scripts" regardless of language. – mattdm Jul 23 '22 at 18:56
  • @Anastazy -- chuckling as in *"Script"* being shorthand for *"Manuscript"*, yes, a writing or written documents is fine. But as used with *"script"* to be read by an interpretive language, it kind of misses the mark when referring to a *"C Source File"*. However, your point was well-made. – David C. Rankin Jul 23 '22 at 23:03

0 Answers0