Re: Python recompile

Liste des GroupesRevenir à cl c 
Sujet : Re: Python recompile
De : bc (at) *nospam* freeuk.com (bart)
Groupes : comp.lang.c
Date : 10. Mar 2025, 18:33:50
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vqn7pv$1far1$1@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
User-Agent : Mozilla Thunderbird
On 10/03/2025 11:45, Waldek Hebisch wrote:
bart <bc@freeuk.com> wrote:

Oh dear, that hasn't worked either.
 Hmm, it AFAICS worked.  That is you wanted build failure and you
got build failure.
In last year's thread I did an experiment with I think 5 projects, and most failed to build using the provided tools.
In the case of Lua, there was an additional complication in that one lot of online sources was incomplete (missing the top directory layer). However what was provided still had a makefile, to confuse matters.
But even with the full sources, there was a catch - see below.

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.
It will nearly always do. In the case of LIBJPEG, there are 5 binaries to build including the two main ones (encode and decode). Each of those comprises 8 .c files, plus they share 46 other .c files.
The official makefile (the fallback one as there were lots!), built those 46 into a .a archive, but which was then /statically/ linked into each executable, so it didn't save any space.
I had to get it working once via the makefile, and arrange to capture the shell commands used in order to determine all this.
 From those, I was able to create two @ files so that I could build only using a compiler. Each file simply lists the 54 files that are needed, and is 4% the size of the makefile. (They can also use a shared @ file to avoid repeating the shared files.)
Using tcc, each program builds from source in 0.3 seconds using such a list, even though 46 source files are processed twice.

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.
I always build lua.exe. I mentioned that luac.c was for embedded, or something.

Documentation also mention explicit targets, like 'make mingw'.
But you probably arranged things so that it fails too.
Actually, looking at the docs more carefully, it seems the makefiles only work for Linux.
For Windows you are on you own. But at least it does list the files involved.
However, I thought the point of 'make' was that you just typed 'make' and it goes and builds your program with no further input. Here, the makefile could have provided a helpful message saying that Windows was not supported.

 
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 ....
So they usually worked after you fixed all the problems? OK!

You miss important point of sources: having sources and free
licence means that anybody can develop program further.
There are two things you may want to do when building sources:
(1) You want to do further development as you say
(2) You simply want to build a working binary and have no interest in anything else.
Those two requirements are utterly different, yet most developers who provide sources ignore that, and simply provide the entire directory tree and a hundred other things that might be needed for (1).
For (2):
* You don't need a sprawling directory tree; files can be flattened into
one folder
* (You don't need separate files; they can be flattened into one file via various tools and scripts. In my case, I do that via a transpiler. For C, this provides the opportunity for whole-program optimisation.)
* You don't need makefiles with tons of dependency info. This stuff is for incremental compilation, but here we are only building once, so it has to be done from scratch anyway. It is not time-critical.
* You might still need to orchestrate the building of multiple binaries,
or to install the result, but for this there are better scripting languages than 'make'. Even C will do, for which the user will already have a compiler. (IMV installation is a quite different process from building.)
* If this is for a known platform, then the process can be streamlined further
Examples of (2) for me are GMP and LIBFFI libraries which are a nightmare to build on Windows.

 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.
You really want to fix things in gcc for example by messing with the source files? I think we establshed that there were at least 79,000 .c files. (Better set aside the rest of the decade to get familiar with it!)

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).
I provide source code for reason (2) above. This is likely to be amalgamated into one file, or transpiled to one C file
For (1), I can provide original source files, but building source in my personal language is problematical. For a start, you need a binary to get started, but people don't like binaries because of AV issues or lack of trust.
(They generally work for mainstream products on Windows; presumably the providers are whitelisted by MS, even if they are not in the MS Store.)

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