Advertisement
Guest User

Untitled

a guest
Oct 20th, 2019
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.80 KB | None | 0 0
  1. * Noweb3 compilation engineering
  2.  
  3. Noweb3 compiles on UNIX. It produces the same PDF files as noweb2,
  4. but it seems simpler as it seems to include its own Lua binary. This
  5. means it might work on Windows. Let's try to compile it on Windows
  6. next.
  7.  
  8. Compiling on Windows. First, you'll need a working noweb version, so
  9. you can't do it on Windows. I did the tangling and weaving on UNIX
  10. and brought the files over, but a fatal problem arises. (See below.)
  11.  
  12. The build system is extremely unwisely written. It should be
  13. rewritten from scratch. On Windows, you can't easily run shell
  14. scripts. Scripts should be explicitly called as ``sh script''. The
  15. build system should work on UNIX and Windows.
  16.  
  17. The first problem is to figure out WHY sys/wait.h is being used.
  18. Windows doesn't have this header, I'm afraid. Was it because of the
  19. generation on UNIX? I doubt it because I think Norman Ramsey did not
  20. seriously have Windows in mind. Must answer this question and find a
  21. workaround. Best approach is to code ONE CODE FOR ALL SYSTEMS. See,
  22. for example, Daniel J Bernstein's packages.
  23.  
  24. Icon's homepage:
  25. https://www2.cs.arizona.edu/icon/current/
  26.  
  27. --8<---------------cut here---------------start------------->8---
  28. %pwd
  29. c:/emacs/tmp/noweb3/c
  30. %make
  31. gcc -ansi -pedantic -g -I../cii/include -I../lua-2.5+nw/include -L../cii -L../lua-2.5+nw/lib -DPLATFORM='"unix"' -Dnw_unix -DNWDEFAULTDIR='"~/tmp/nw3/lib3"' -DTEMPNAM -c -o xpipe.o xpipe.c
  32. In file included from xpipe.nw:560:0:
  33. nwprocess.nw:29:13: error: expected declaration specifiers or '...' before '(' token
  34. _spawnvpe ((mode), (filename), (argvect), environ);
  35. ^
  36. nwprocess.nw:29:21: error: expected declaration specifiers or '...' before '(' token
  37. _spawnvpe ((mode), (filename), (argvect), environ);
  38. ^
  39. nwprocess.nw:29:33: error: expected declaration specifiers or '...' before '(' token
  40. _spawnvpe ((mode), (filename), (argvect), environ);
  41. ^
  42. nwprocess.nw:29:44: error: unknown type name 'environ'
  43. _spawnvpe ((mode), (filename), (argvect), environ);
  44. ^
  45. In file included from c:\emacs\mingw\include\unistd.h:54:0,
  46. from xpipe.nw:624:
  47. c:\emacs\mingw\include\process.h:80:42: error: conflicting types for '_spawnvpe'
  48. _CRTIMP intptr_t __cdecl __MINGW_NOTHROW _spawnvpe (int, const char*, const char* const*, const char* const*);
  49. ^
  50. In file included from xpipe.nw:560:0:
  51. nwprocess.nw:21:5: note: previous declaration of '_spawnvpe' was here
  52. int _spawnvpe ( int mode /* P_WAIT or P_NOWAIT */
  53. ^
  54. nwprocess.nw:31:13: error: expected declaration specifiers or '...' before '(' token
  55. _spawnvpe ((mode), (filename), (argvect), environ);
  56. ^
  57. nwprocess.nw:31:21: error: expected declaration specifiers or '...' before '(' token
  58. _spawnvpe ((mode), (filename), (argvect), environ);
  59. ^
  60. nwprocess.nw:31:33: error: expected declaration specifiers or '...' before '(' token
  61. _spawnvpe ((mode), (filename), (argvect), environ);
  62. ^
  63. nwprocess.nw:31:44: error: unknown type name 'environ'
  64. _spawnvpe ((mode), (filename), (argvect), environ);
  65. ^
  66. nwprocess.nw:27:18: error: conflicting types for '_spawnvpe'
  67. #define spawnvpe _spawnvpe
  68. ^
  69. nwprocess.nw:21:5: note: previous declaration of '_spawnvpe' was here
  70. int _spawnvpe ( int mode /* P_WAIT or P_NOWAIT */
  71. ^
  72. xpipe.nw:626:22: fatal error: sys/wait.h: No such file or directory
  73. #include <sys/wait.h>
  74. ^
  75. compilation terminated.
  76. <builtin>: recipe for target 'xpipe.o' failed
  77. make: *** [xpipe.o] Error 1
  78. %--8<---------------cut here---------------end--------------->8---
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement