Re: Python recompile

Liste des GroupesRevenir à cl c 
Sujet : Re: Python recompile
De : antispam (at) *nospam* fricas.org (Waldek Hebisch)
Groupes : comp.lang.c
Date : 10. Mar 2025, 12:45:30
Autres entêtes
Organisation : To protect and to server
Message-ID : <vqmjco$3a86r$1@paganini.bofh.team>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
User-Agent : tin/2.6.2-20221225 ("Pittyvaich") (Linux/6.1.0-9-amd64 (x86_64))
bart <bc@freeuk.com> wrote:
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.

Hmm, it AFAICS worked.  That is you wanted build failure and you
got build failure.  Of course you are an export on building
Windows programs and have your tricks.  In this case a simple
one, like not having MinGW tools in the patch probably will do.

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).

Not reading instructions help in writing newsgroup post.  If you
read documentation you would see that build process is supposed to
build 3 related products: Lua library, Lua interpreter and Lua
compiler (whatever the last things means).  The is explicit list
of files giving you the Lua library.  Link it with one extra file
(that is 'lua.c') and you get Lua interpteter.  Link the library
with 'luac.c' and you get the compiler.

Documentation also mention explicit targets, like 'make mingw'.
But you probably arranged things so that it fails too.

The makefiles are full of useless dependency info. Lua is a small
program, and I just want to use it, not develop it.

AFAICS you want something to compile with your compiler and
claim that make fails.  When I needed to build programs on
Windows make usually worked.  Of course, I had to install
dependencies first.  I had to look at the PATH, in particular
watch out for Borland 'make' which was normally quite early
in the path, but Borland 'make' was to crappy and unable to
handle most Makefiles.  I am not sure if I needed to do this
on Windows, but on some systems I needed to correct sources
to get working program.  For such cases having all development
info was quite useful.

You miss important point of sources: having sources and free
licence means that anybody can develop program further.  In
particular people can do simple customization or bug fixes.
So if I find program useful, it is my decision if I want
to do work needed to keep it running on my system or port to
a different system.  I case of binaries it is usually unfeasible
to fix bugs or port it (people use emulators, but this has
limitations).  And if program is useful enough there is good
chance that sombody else already did the work.

BTW: I did have trouble with some Windows sources, and main
trouble was that source was incomplete or missed some needed
changes.  That is trouble was due to people who did not care
about distributing sources (but should have cared, as those cases
were Windows adaptions of GPL-ed things).

--
                              Waldek Hebisch

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