Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
39 user(s) are online (25 user(s) are browsing Forums)

Members: 0
Guests: 39

more...

Support us!

Headlines

 
  Register To Post  

« 1 2 (3) 4 »
Re: CMake 3.29 Native (OS4)
Not too shy to talk
Not too shy to talk


See User information
Do we need .unix files anywhere other than the cmake bin directory? I think I have one in my project directory but probably not my build directory.

[EDIT] Looks like I can answer my own question on this. I added a unix file in the build folder and it then runs but does very little except eat CPU. It created the CMakeFiles folder / drawer / directory and inside that the pkgRedirect directory, but didn't go any further. As far as I can tell there was nothing nasty going on except the process being difficult to kill because of the maxed out CPU.

I'm currently testing this with a very simple Hello World C++ file and a 3 line cmake file.


Edited by MartinW on 2024/9/9 11:35:33

Amiga x5040 ı 16GB ı RX580
GB-A1000 060@100,
A1200 PiStorm32-Lite CM4
Go to top
Re: CMake 3.29 Native (OS4)
Just can't stay away
Just can't stay away


See User information
@MartinW

Quote:
I added a unix file in the build folder and it then runs


This indicates, that you are not using the right version of clib4.library. This is the "old" behavior.

Quote:
t created the CMakeFiles folder / drawer / directory and inside that the pkgRedirect directory, but didn't go any further.


So no Makefile?

Go to top
Re: CMake 3.29 Native (OS4)
Not too shy to talk
Not too shy to talk


See User information
ahhh, hang on - I downloaded the clib4 lib from GitHub and placed it in the bin folder but I may well have the older one in my system. Does the one in the bin folder not take precedence? I honestly don't know how OS4 works in that regard.

And yeah, nothing other than an empty folder. I had to kill it.


Amiga x5040 ı 16GB ı RX580
GB-A1000 060@100,
A1200 PiStorm32-Lite CM4
Go to top
Re: CMake 3.29 Native (OS4)
Just can't stay away
Just can't stay away


See User information
@MartinW

Quote:
ahhh, hang on - I downloaded the clib4 lib from GitHub and placed it in the bin folder


Ahem - try again (by downloading), and this time place it in SYS:Libs/

You may want to backup any existing previous version, in case you should have clib4 apps with specific requirements.

Quote:
Does the one in the bin folder not take precedence? I honestly don't know how OS4 works in that regard.


I just checked, and it doesn't. In fact, I never heard of any ways to reference libraries other than placing them in the Libs: directory. Obviously this is different for .so files, I think there is a hierachy of paths for this kind of reference. So you would think this kind of thing could be useful for .library files as well. If someone knows anything about the subject, feel free to add to the text.

Go to top
Re: CMake 3.29 Native (OS4)
Not too shy to talk
Not too shy to talk


See User information
@elfpipe

That's fine - I'll give it another go after work. Just my assumption based on other OS's I did read the instructions but when it worked, I wrongly assumed the bin folder was also OK. Completely forgot that I already had clib4 because my project uses Raylib which is built against it. If there's nothing special about this latest version, other than being a bit newer then that's fine. I don't think I've got anything else that's using Clib4 at the moment but I don't really know.

Ideally I'd like to build my project locally using this cmake and clib4 but I can't because the gcc in the SDK doesn't recognise clib4 as a valid runtime. Obviously I could rename clib4 to clib2 but that's not a great idea. I've already demonstrated my complete inability to remember when I've done stupid stuff.


Amiga x5040 ı 16GB ı RX580
GB-A1000 060@100,
A1200 PiStorm32-Lite CM4
Go to top
Re: CMake 3.29 Native (OS4)
Just can't stay away
Just can't stay away


See User information
@MartinW

The idea of an Amiga-type .library is that it can be opened shared by multiple processes, and still only one physical copy of the code is in ram (only the process' own instances of any variables are duplicated).

Therefore the normal rule is to put it in the system-wide location LIBS:.

But if you really want to, you can always make a local Libs subdir in your program directory, and then Assign ADD that to LIBS:. That is what e.g. MUI does.

(Hope I've explained this correctly and understandably.)

Best regards,

Niels

Go to top
Re: CMake 3.29 Native (OS4)
Not too shy to talk
Not too shy to talk


See User information
@nbache
yes, very clear and understood, thanks! Remebering it for next time however is another challenge

@elfpipe
Onwards and upwards! Of sorts. CMake doesn't just bail now, so I assume my libs are now sorted.

I have the following trivial CmakeLists.txt - trying to make a test as simple as possible:
cmake_minimum_required(VERSION 3.29)
project(hello VERSION 1.0)

add_executable(hello hello.cxx)


I've never used cmake with C++ before so it's possible the "cxx" in the last line is incorrect, however, I get the following output.

11.Data:Dev/Projects/Tutorials/buildcmake ..
-- 
CMAKE_HOST_SYSTEM_VERSION 53.18
CMake Error
CMake was unable to find a build program corresponding to "Unix Makefiles".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
CMake ErrorCMAKE_C_COMPILER not setafter EnableLanguage
CMake Error
CMAKE_CXX_COMPILER not setafter EnableLanguage
-- Configuring incompleteerrors occurred!


Just to preempt the next question, here is my s:user-startup snippet:
;BEGIN CMake-3.29
assign cmake
-amigaDATA:dev/cmake-amiga
setenv PATH 
/SDK/gcc/bin:SDK/C:/SDK/local/C:/data/dev/cmake-amiga/bin
path cmake
-amiga:bin ADD
;END CMake-3.29


I checked before adding that path, that in the unix environment echo $PATH did not return anything, otherwise I would have done something like setenv PATH $PATH:blah

I have verified from the command line that the paths (both OS4 and unix) do indeed match that, and also the assign is present. Also that gmake can indeed be found in that path (at /SDK/C).

Since I'm not cross-compiling, I shouldn't need a toolchain file, correct?

Apologies if this is more than you were barganing on when you asked if people could test it :lol I also sincerely hope this isn't more of my environment not being setup correctly as that's a waste of your time!!

PS: I did try to set CMAKE_MAKE_PROGRAM but it didn't help and that's not something that I've explicitly had to do one other platforms unless, iirc, cross-compiling.


Amiga x5040 ı 16GB ı RX580
GB-A1000 060@100,
A1200 PiStorm32-Lite CM4
Go to top
Re: CMake 3.29 Native (OS4)
Not too shy to talk
Not too shy to talk


See User information
Last one from me for tonight...

If I set the items cmake is complaining about on the command line, cmake get's further but ultimately fails on the simple program compile test. If I check the TryCompile folder after, it's empty so either this is a temporary folder, or maybe there's still a path issue? (Or a 'my environment' issue?)

Switched the code to plain C for now to make life simpler.

Hope this all helps...

10.Data:Dev/Projects/Tutorials/buildcmake -DCMAKE_MAKE_PROGRAM=make -DCMAKE_C_COMPILER=gcc ..
-- 
CMAKE_HOST_SYSTEM_VERSION 53.18
-- The C compiler identification is GNU 8.4.0
-- Detecting C compiler ABI info
CMake Error
Generatorexecution of make failedMake command was: /Data/Dev/cmake-amiga/bin/cmake -E env VERBOSE=1 MAKE=gmake make -f Makefile cmTC_4ae33/fast
-- Detecting C compiler ABI info failed
-- Check for working C compiler: /SDK/gcc/bin/gcc
CMake Error
Generatorexecution of make failedMake command was: /Data/Dev/cmake-amiga/bin/cmake -E env VERBOSE=1 MAKE=gmake make -f Makefile cmTC_85baa/fast
-- Check for working C compiler: /SDK/gcc/bin/gcc broken
CMake Error at 
/Data/Dev/cmake-amiga/share/cmake-3.29/Modules/CMakeTestCCompiler.cmake:67 (message):
  
The C compiler

    
"/SDK/gcc/bin/gcc"

  
is not able to compile a simple test program.

  
It fails with the following output:

    
Change Dir'/Data/Dev/Projects/Tutorials/build/CMakeFiles/CMakeScratch/TryCompile-DPWXMS'
    
    
Run Build Command(s): /Data/Dev/cmake-amiga/bin/cmake -E env VERBOSE=1 MAKE=gmake make -f Makefile cmTC_85baa/fast
    SIGHUP
    Generator
execution of make failedMake command was: /Data/Dev/cmake-amiga/bin/cmake -E env VERBOSE=1 MAKE=gmake make -f Makefile cmTC_85baa/fast
    

  

  CMake will not be able to correctly generate this project
.
Call Stack (most recent call first):
  
CMakeLists.txt:(project)


-- 
Configuring incompleteerrors occurred!
10.Data:Dev/Projects/Tutorials/build>


Amiga x5040 ı 16GB ı RX580
GB-A1000 060@100,
A1200 PiStorm32-Lite CM4
Go to top
Re: CMake 3.29 Native (OS4)
Just can't stay away
Just can't stay away


See User information
@MartinW

Quote:
Hope this all helps...


It does. :)

We are looking for the simplest possible setup, so you shouldn't have to add items to the command line. Remember though, that if you ran the cmake command previously on that folder, it will "remember" certain configuration steps (including that they failed). I can recommend running something like

delete #? all

in the build folder, before running cmake .. again.


Edited by elfpipe on 2024/9/10 7:44:41
Go to top
Re: CMake 3.29 Native (OS4)
Just can't stay away
Just can't stay away


See User information
@nbache

Quote:
But if you really want to, you can always make a local Libs subdir in your program directory, and then Assign ADD that to LIBS:. That is what e.g. MUI does.


The problem is that - for instance in cases like this, where there are multiple versions of a library (clib4.library), and different applications might need different versions of it - there is no option to have a local version that overrides the "public" version. If there was something like the sobjs: construction, where the binary loader (elf.library) first looks in a local folder (for instance appdir:libs/) and only if the library is not found here, it looks in the public libs: folder. Then that would be a solution to the dependency problem.

Of course you can specify a specific version, when you open the library. But when using clib4.library this is not a possibility (at least not from an application perspective), because you are not in control of the library opening code.

Go to top
Re: CMake 3.29 Native (OS4)
Not too shy to talk
Not too shy to talk


See User information
Just so you know, I was already removing the build folder between tries. So the result is as above. I’m by no means an expert when it comes to cmake, but I’ve definitely come across that one before :)


Amiga x5040 ı 16GB ı RX580
GB-A1000 060@100,
A1200 PiStorm32-Lite CM4
Go to top
Re: CMake 3.29 Native (OS4)
Just can't stay away
Just can't stay away


See User information
@elfpipe

struct Library *OpenLibrary(STRPTR, ULONG);
...
A full path name for the library name is legitimate. For example "wp:libs/wp.library". This allows the use of custom libraries without requiring the user to copy the library into the system's LIBS: directory.

so if you set a fullpath to clib4_lib then 1st it will look there (if not already in memory)

Go to top
Re: CMake 3.29 Native (OS4)
Just can't stay away
Just can't stay away


See User information
@MartinW

Quote:
Just so you know, I was already removing the build folder between tries. So the result is as above. I’m by no means an expert when it comes to cmake, but I’ve definitely come across that one before :)


Thanks! In the meantime, I did some calculations and figured out, that the problem is indeed a problem with symbolic links. I will test and turn the text and come up with a solution in a week or two.

Go to top
Re: CMake 3.29 Native (OS4)
Just can't stay away
Just can't stay away


See User information
@jabirulo

Quote:
so if you set a fullpath to clib4_lib then 1st it will look there (if not already in memory)
Yeah, but there's the catch, isn't it? If the library is already in memory, and you haven't specified a (minimum) version, you'll get the one in memory, even if you specify another path. At least I think so (in matters like this I'm relying on what I think I read/understood some time in the past rather than lots of practical experience ).

Best regards,

Niels

Go to top
Re: CMake 3.29 Native (OS4)
Just can't stay away
Just can't stay away


See User information
@nbache

Quote:
If the library is already in memory...


Now, I guess I am not too involved in clib4 development, but I guess one of the main goals must be to make a perfect library, that is immutable and clear and meets all your needs. In all other cases, there could be the possibility of different apps relying on different quirks of different versions of that library, and it would be impossible to meet those needs, unless the user could pick and choose.

Go to top
Re: CMake 3.29 Native (OS4)
Just can't stay away
Just can't stay away


See User information
Release 0.0.2a :

CMake 3.29 alpha2 on GitHub

Remember to get also the new version of clib4.library. Cheers!

Go to top
Re: CMake 3.29 Native (OS4)
Home away from home
Home away from home


See User information
@elfpipe

OpenLibrary is part of Exec.library, its not part of clib4.

How OpenLibrary / ramlib works is defined by the OS.
not by libraries you make. So, this is something for the ExecSG Team.
That’s unless you make a ugly patch.

In any case, I know you where able to make changes to elf.library, so perhaps you are on the inside, if you have the possibility to makes changes to, it, perhaps you can make OpenLibrary case insensitive, while your at it.

(NutsAboutAmiga)

Basilisk II for AmigaOS4
AmigaInputAnywhere
Excalibur
and other tools and apps.
Go to top
Re: CMake 3.29 Native (OS4)
Not too shy to talk
Not too shy to talk


See User information
Just to report back that I got the new cmake working in the end. Now I need to spend some time testing it on more complex projects than hello world.


Amiga x5040 ı 16GB ı RX580
GB-A1000 060@100,
A1200 PiStorm32-Lite CM4
Go to top
Re: CMake 3.29 Native (OS4)
Just can't stay away
Just can't stay away


See User information
@MartinW

Please post a screenshot here.

Go to top
Re: CMake 3.29 Native (OS4)
Not too shy to talk
Not too shy to talk


See User information
Not sure if this is what you mean, or if you mean later when I test it against more complex projects, but here's where I'm at so far. The issue, rather embarrassingly was that when added the path to my startup sequence, I'd missed the forward slash in /SDK/C which is why it couldn't find make and wasn't producing any makefiles. Instead it got a SIGHUP signal.

In the end, it worked fine from an Amiga shell and didn't need me to specifically be in abcshell. All works very nicely so far. I'll report back if I run into any issues when adding more complexity.

Resized Image


Amiga x5040 ı 16GB ı RX580
GB-A1000 060@100,
A1200 PiStorm32-Lite CM4
Go to top

  Register To Post
« 1 2 (3) 4 »

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2023 The XOOPS Project