Re: Python recompile

Liste des GroupesRevenir à cl c 
Sujet : Re: Python recompile
De : bc (at) *nospam* freeuk.com (bart)
Groupes : comp.lang.c
Date : 08. Mar 2025, 17:46:14
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vqhs8o$7o8n$1@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
User-Agent : Mozilla Thunderbird
On 08/03/2025 15:51, Muttley@dastardlyhq.com wrote:
On Sat, 8 Mar 2025 14:09:17 +0000
bart <bc@freeuk.com> gabbled:
My idea is similar to supplying binaries, but replacing each binary file with one C source file. This now needs a C compiler to turn into a binary, but nothing else. No configure, no makefiles, virtually no special options, no special compiler needed and no special version.
 So instead of just typing "make" the user has to know how to invoke the
compiler, possibly with certain switches set. Not sure how thats any better.
I've just typed 'make' in a Windows prompt. Nothing happens ('command not recognised'). That's a good start!
If I look at my gcc binaries, there's a program called 'mingw32-make.exe'. Maybe that's the one. However, build instructions call for 'make' so it will immediately fail.
What Make does is take a mountain of complexity called a 'makefile', which is special kind of arcane language, and tries to run it. It might work, it might fail immediately, or it might grind away for several minutes and then it stops.
Why I am aiming for is to be able to just type:
    gcc prog.c
But apparently that won't do. Some smart-arses will point out that that's more typing than 'make'. Others, less smart, don't actually know how to directly invoke a compiler like this.
Now, it's been a while since I've argued about makefiles and all their woes. But maybe things have changed. If I copy that file above to 'make.exe', and navigate to a folder full of Lua source files, I see it also has this:
   c:\luac>dir make*
   02/02/2024  13:18             7,722 Makefile
So according to you, this should be a piece of piss. OK, I'll try it:
   c:\luac>make
   makefile:103: target 'AIX' given more than once in the same rule
   makefile:117: target 'FreeBSD' given more than once in the same rule
   Guessing `uname`
   make[1]: Entering directory 'c:/luac'
   makefile:103: target 'AIX' given more than once in the same rule
   makefile:117: target 'FreeBSD' given more than once in the same rule
   make[1]: *** No rule to make target '`uname`'.  Stop.
   make[1]: Leaving directory 'c:/luac'
   make: *** [makefile:101: guess] Error 2
That went well! Maybe this is the wrong one, and I've been messing about with these files. So I download a fresh Lua versiom as a .tar.gz file and install it. Yes, there were in fact two makefiles, one in a higher directory level:
   c:\ll\lua-5.4.7>dir
   13/06/2024  22:16    <DIR>          .
   08/03/2025  16:15    <DIR>          ..
   13/06/2024  22:16    <DIR>          doc
   08/05/2024  21:47             3,150 Makefile
   13/06/2024  22:16               151 README
   13/06/2024  22:15    <DIR>          src
I now follow the instructions from here: https://www.lua.org/download.html and do this:
   c:\ll\lua-5.4.7>make all test
   make[1]: Entering directory 'c:/ll/lua-5.4.7/src'
   makefile:101: target 'AIX' given more than once in the same rule
   makefile:115: target 'FreeBSD' given more than once in the same rule
   .....
   make[2]: Leaving directory 'c:/ll/lua-5.4.7/src'
   make[1]: *** [makefile:99: guess] Error 2
   make[1]: Leaving directory 'c:/ll/lua-5.4.7/src'
   make: *** [makefile:55: guess] Error 2
Oh dear, that hasn't worked either. So now what? Maybe forget all that, and just for a prebuilt binary here: https://github.com/rjpcomputing/luaforwindows/releases. However, that's an old 5.1 version.
Or I could just build Lua the easy way:
   c:\ll\lua-5.4.7\src>del luac.c
   c:\ll\lua-5.4.7\src>gcc *.c -o lua
   c:\ll\lua-5.4.7\src>lua
   Lua 5.4.7  Copyright (C) 1994-2024 Lua.org, PUC-Rio
   >
This works! No crappy makefiles needed. Here I happened to know it involves compiling 33 of the 34 C files supplied (luac.c is for embedded I think).
The makefiles are full of useless dependency info. Lua is a small program, and I just want to use it, not develop it. So it only needs to be built once, and the makefile then could then be ultra-simple; it might even work!
In any case, tcc builds it in 1/4 of a second.

which has a load of ifdefs in the code itself and the user doesn't
have to
do anything except pick the correct makefile or for windows project
file.
>
I suspect you either haven't done much building of open source software on Windows, or were remarkably lucky.
 True. I've done a small amount of C/C++ dev on Windows but these days I wouldn't touch it with a 10 foot pole and rubber gloves.
The problem is not with Windows!
The real problem is that you are so over-reliant on all the variety of tools within your Linux eco-system, that you are lost in an environment where that doesn't exist.
I find it easy to develop on Windows because I have few dependencies, and I would find it easy to develop on Linux - if I had to. (However it has some annoying things would drive me up the wall.)

Date Sujet#  Auteur
2 Mar 25 * Re: Python recompile383Lew Pitcher
2 Mar 25 `* Re: Python recompile382Muttley
2 Mar 25  +* Re: Python recompile2Lew Pitcher
3 Mar 25  i`- Re: Python recompile1Muttley
2 Mar 25  `* Re: Python recompile379James Kuyper
3 Mar 25   +* Re: Python recompile377Muttley
3 Mar 25   i+* Re: Python recompile7Richard Heathfield
3 Mar 25   ii`* Re: Python recompile6Muttley
3 Mar 25   ii +* Re: Python recompile3bart
3 Mar 25   ii i`* Re: Python recompile2Muttley
3 Mar 25   ii i `- Re: Python recompile1bart
3 Mar 25   ii `* Re: Python recompile2Richard Heathfield
3 Mar 25   ii  `- Re: Python recompile1Muttley
3 Mar 25   i`* Re: Python recompile369James Kuyper
3 Mar 25   i +- Re: Python recompile1Muttley
3 Mar 25   i `* Re: Python recompile367geodandw
3 Mar 25   i  +- Re: Python recompile1Muttley
3 Mar 25   i  +* Re: Python recompile340James Kuyper
3 Mar 25   i  i+* Re: Python recompile337Muttley
3 Mar 25   i  ii+* Re: Python recompile3David Brown
4 Mar 25   i  iii`* Re: Python recompile2Muttley
4 Mar 25   i  iii `- Re: Python recompile1Kaz Kylheku
3 Mar 25   i  ii+* Re: Python recompile332Richard Heathfield
4 Mar 25   i  iii`* Re: Python recompile331Muttley
4 Mar 25   i  iii `* Re: Python recompile330Richard Heathfield
4 Mar 25   i  iii  +* Re: Python recompile328Muttley
4 Mar 25   i  iii  i`* Re: Python recompile327Richard Heathfield
4 Mar 25   i  iii  i `* Re: Python recompile326Muttley
4 Mar 25   i  iii  i  +* Re: Python recompile5Richard Heathfield
4 Mar 25   i  iii  i  i`* Re: Python recompile4Muttley
4 Mar 25   i  iii  i  i `* Re: Python recompile3bart
4 Mar 25   i  iii  i  i  `* Re: Python recompile2Muttley
4 Mar 25   i  iii  i  i   `- Re: Python recompile1Kaz Kylheku
4 Mar 25   i  iii  i  `* Re: Python recompile320Kaz Kylheku
4 Mar 25   i  iii  i   `* Re: Python recompile319bart
5 Mar 25   i  iii  i    +* Re: Python recompile27Lawrence D'Oliveiro
5 Mar 25   i  iii  i    i`* Re: Python recompile26bart
5 Mar 25   i  iii  i    i `* Re: Python recompile25Lawrence D'Oliveiro
5 Mar 25   i  iii  i    i  `* Re: Python recompile24bart
5 Mar 25   i  iii  i    i   +* Re: Python recompile8Muttley
6 Mar 25   i  iii  i    i   i`* Re: Python recompile7Lawrence D'Oliveiro
6 Mar 25   i  iii  i    i   i `* Re: Python recompile6Muttley
6 Mar 25   i  iii  i    i   i  +* Re: Python recompile2Kaz Kylheku
7 Mar 25   i  iii  i    i   i  i`- Re: Python recompile1Mark Bourne
6 Mar 25   i  iii  i    i   i  `* Re: Python recompile3Lawrence D'Oliveiro
7 Mar 25   i  iii  i    i   i   `* Re: Python recompile2Muttley
7 Mar 25   i  iii  i    i   i    `- Re: Python recompile1Lawrence D'Oliveiro
6 Mar 25   i  iii  i    i   +* Re: Python recompile11Tim Rentsch
6 Mar 25   i  iii  i    i   i`* Re: Python recompile10bart
6 Mar 25   i  iii  i    i   i `* Re: Python recompile9Tim Rentsch
7 Mar 25   i  iii  i    i   i  +* Re: Python recompile6bart
13 Mar 25   i  iii  i    i   i  i`* Re: Python recompile5Tim Rentsch
15 Mar 25   i  iii  i    i   i  i `* Re: Python recompile4bart
19 Mar 25   i  iii  i    i   i  i  `* Re: Python recompile3Tim Rentsch
19 Mar 25   i  iii  i    i   i  i   `* Re: Python recompile2bart
21 Mar 25   i  iii  i    i   i  i    `- Re: Python recompile1Tim Rentsch
7 Mar 25   i  iii  i    i   i  `* Re: Python recompile2Waldek Hebisch
13 Mar 25   i  iii  i    i   i   `- Re: Python recompile1Tim Rentsch
6 Mar 25   i  iii  i    i   `* Re: Python recompile4Lawrence D'Oliveiro
6 Mar 25   i  iii  i    i    `* Re: Python recompile3bart
6 Mar 25   i  iii  i    i     `* Re: Python recompile2Lawrence D'Oliveiro
7 Mar 25   i  iii  i    i      `- Re: Python recompile1David Brown
5 Mar 25   i  iii  i    +* Re: Python recompile290Muttley
5 Mar 25   i  iii  i    i+* Re: Python recompile3Lawrence D'Oliveiro
6 Mar 25   i  iii  i    ii`* Re: Python recompile2bart
6 Mar 25   i  iii  i    ii `- Re: Python recompile1Lawrence D'Oliveiro
6 Mar 25   i  iii  i    i`* Re: Python recompile286Waldek Hebisch
6 Mar 25   i  iii  i    i +* Re: Python recompile5bart
6 Mar 25   i  iii  i    i i+- Re: Python recompile1Lawrence D'Oliveiro
7 Mar 25   i  iii  i    i i`* Re: Python recompile3Waldek Hebisch
8 Mar 25   i  iii  i    i i `* Re: Python recompile2bart
11 Mar 25   i  iii  i    i i  `- Re: Python recompile1Waldek Hebisch
6 Mar 25   i  iii  i    i +- Re: Python recompile1Lawrence D'Oliveiro
7 Mar 25   i  iii  i    i +* Re: Python recompile275Muttley
7 Mar 25   i  iii  i    i i`* Re: Python recompile274bart
7 Mar 25   i  iii  i    i i +* Re: Python recompile269Muttley
7 Mar 25   i  iii  i    i i i`* Re: Python recompile268bart
7 Mar 25   i  iii  i    i i i +* Re: Python recompile233Keith Thompson
7 Mar 25   i  iii  i    i i i i+* Re: Python recompile9bart
7 Mar 25   i  iii  i    i i i ii+- Re: Python recompile1flexibeast
8 Mar 25   i  iii  i    i i i ii+* Re: Python recompile2Keith Thompson
8 Mar 25   i  iii  i    i i i iii`- Re: Python recompile1Kaz Kylheku
8 Mar 25   i  iii  i    i i i ii+* Re: Python recompile4Keith Thompson
8 Mar 25   i  iii  i    i i i iii`* Re: Python recompile3bart
8 Mar 25   i  iii  i    i i i iii `* Re: Python recompile2Keith Thompson
8 Mar 25   i  iii  i    i i i iii  `- Re: Python recompile1bart
8 Mar 25   i  iii  i    i i i ii`- Re: Python recompile1Lawrence D'Oliveiro
8 Mar 25   i  iii  i    i i i i`* Re: Python recompile223Michael S
8 Mar 25   i  iii  i    i i i i `* Re: Python recompile222bart
8 Mar 25   i  iii  i    i i i i  +* Re: Python recompile92Chris M. Thomasson
9 Mar 25   i  iii  i    i i i i  i`* Re: Python recompile91Lawrence D'Oliveiro
9 Mar 25   i  iii  i    i i i i  i `* Re: Python recompile90Michael S
9 Mar 25   i  iii  i    i i i i  i  +* Re: Python recompile87Lawrence D'Oliveiro
9 Mar 25   i  iii  i    i i i i  i  i+* Re: Python recompile33Michael S
9 Mar 25   i  iii  i    i i i i  i  ii+- Re: Python recompile1Michael S
9 Mar 25   i  iii  i    i i i i  i  ii+- What is the source language? (Was: Python recompile)1Kenny McCormack
9 Mar 25   i  iii  i    i i i i  i  ii+- Re: Python recompile1Kaz Kylheku
9 Mar 25   i  iii  i    i i i i  i  ii`* Re: Python recompile29Lawrence D'Oliveiro
10 Mar 25   i  iii  i    i i i i  i  ii `* Re: Python recompile28Michael S
10 Mar 25   i  iii  i    i i i i  i  ii  +* Re: Python recompile13Muttley
10 Mar 25   i  iii  i    i i i i  i  ii  i+* Re: Python recompile3Kaz Kylheku
10 Mar 25   i  iii  i    i i i i  i  ii  i+* Re: Python recompile7Lawrence D'Oliveiro
11 Mar 25   i  iii  i    i i i i  i  ii  i`* Re: Python recompile2Muttley
10 Mar 25   i  iii  i    i i i i  i  ii  `* Re: Python recompile14Lawrence D'Oliveiro
10 Mar 25   i  iii  i    i i i i  i  i`* Re: Python recompile53Chris M. Thomasson
9 Mar 25   i  iii  i    i i i i  i  `* Re: Python recompile2Kaz Kylheku
10 Mar 25   i  iii  i    i i i i  `* Re: Python recompile129Waldek Hebisch
8 Mar 25   i  iii  i    i i i `* Re: Python recompile34Muttley
7 Mar 25   i  iii  i    i i +- Re: Python recompile1Keith Thompson
7 Mar 25   i  iii  i    i i `* Re: Python recompile3Lawrence D'Oliveiro
7 Mar 25   i  iii  i    i `* Re: Python recompile4Lawrence D'Oliveiro
6 Mar 25   i  iii  i    `- Re: Python recompile1Lawrence D'Oliveiro
5 Mar 25   i  iii  `- Re: Python recompile1James Kuyper
4 Mar 25   i  ii`- Re: Python recompile1Kenny McCormack
3 Mar 25   i  i`* Re: Python recompile2geodandw
3 Mar 25   i  +* Re: Python recompile10Richard Heathfield
3 Mar 25   i  +* Re: Python recompile8David Brown
6 Mar 25   i  `* Re: Python recompile7Stuart Redmann
3 Mar 25   `- Re: Python recompile1Tim Rentsch

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal