LADSoft / OrangeC

OrangeC Compiler And Tool Chain
http://ladsoft.tripod.com/orange_c_compiler.html
Other
284 stars 39 forks source link

Can I compile only omake? #1034

Open ghost opened 1 month ago

ghost commented 1 month ago

I'm only interested in omake at the moment. I want to compile omake in Cygwin and have it work in this POSIX environment.

LADSoft commented 1 month ago

omake has its own repository outside the compiler project, but the sources are likely to lag just a little in that repository as I don't keep it up to date except when I do a release....

https://github.com/LADSoft/OMAKE

I think that might have a separate make file that will build the project.

basically if you want to snag it from the compiler project rather than from there you have to grab the 'omake' and 'util' directories, it doesn't need anything else.

The problem is going to be, that while it will compile in a linux environment, it doesn't actually have certain functionality it needs in that environment as we haven't finished porting it. Unfortunately, omake is the one project out of the suite that is heavily dependent on WIN32 functionality.... we've been updating it slowly but that hasn't been a focus.

The windows functionality is mostly encapsulated in os.cpp... if interested in seeing the scope of the problem you can look for the #define TARGET_OS_WINDOWS. Additionally though we made a semaphore implementation for the jobserver portion and we did port that to linux, however it has never been tested in that environment.. so it may be broken.

note that the 'util' directory also has some dependencies on windows, but, for your purposes possibly the only one that would bite you at this point is missing functionality for wildcard file names, and I'm not sure but I don't think omake uses even that....

ghost commented 1 month ago

The problem is going to be, that while it will compile in a linux environment, it doesn't actually have certain functionality it needs in that environment as we haven't finished porting it.

Please go away from using semaphores on Linux. GNU Make uses named pipes on Linux:

https://www.gnu.org/software/make/manual/html_node/POSIX-Jobserver.html

LADSoft commented 1 month ago

Im not sure what exactly the rational was for not putting posix named semaphores in from the beginning, as I didn't write the code. When I get there I will have to figure something out about that though I guess....

chuggafan commented 1 month ago

https://github.com/LADSoft/OrangeC/blob/master/src/omake/os_specific/Linux/Linux_Jobserver.cpp

For the jobserver we actually do use named pipes, so as long as OMake hasn't changed from the JobServer api I set up way earlier it should be using named pipes.

On Sun, May 19, 2024 at 8:32 PM David Lindauer @.***> wrote:

Im not sure what exactly the rational was for not putting posix named semaphores in from the beginning, as I didn't write the code. When I get there I will have to figure something out about that though I guess....

— Reply to this email directly, view it on GitHub https://github.com/LADSoft/OrangeC/issues/1034#issuecomment-2119476683, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADSPBTVXLWQFCKALTCX37RDZDFADFAVCNFSM6AAAAABH4UOOR2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMJZGQ3TMNRYGM . You are receiving this because you are subscribed to this thread.Message ID: @.***>

LADSoft commented 1 month ago

@chuggafan. oh in my comment I was referring to a comment in semaphores.h about named pipes being even worse than they are on windows, so they aren't used. Guess that is a different part of the code...

I looked at linux_jobserver.cpp, I don't know about the original implementation but the current implementation seems to use pipes???? I guess that is a reasonable implementation as well...

chuggafan commented 1 month ago

https://github.com/LADSoft/OrangeC/issues/659

This implementation with pipes is spec with GNU make, I didn't mean to say "named pipes", it's a good old regular UNIX pipe as per the spec as mentioned when I was first drafting this issue. I messed up saying "named pipes" without thinking

On Mon, May 20, 2024 at 6:22 PM David Lindauer @.***> wrote:

@chuggafan https://github.com/chuggafan. oh in my comment I was referring to a comment in semaphores.h about named pipes being even worse than they are on windows, so they aren't used. Guess that is a different part of the code...

I looked at linux_jobserver.cpp, I don't know about the original implementation but the current implementation seems to use pipes???? I guess that is a reasonable implementation as well...

— Reply to this email directly, view it on GitHub https://github.com/LADSoft/OrangeC/issues/1034#issuecomment-2121314641, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADSPBTQPGFWOLJIJO53YB4LZDJZT7AVCNFSM6AAAAABH4UOOR2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMRRGMYTINRUGE . You are receiving this because you were mentioned.Message ID: @.***>