Home  
Login
Username:

Password:

Remember me



Lost Password?

Register now!
Sections
Who's Online
59 user(s) are online (49 user(s) are browsing Forums)

Members: 0
Guests: 59

more...
Support us!
Recent OS4 Files
OS4Depot.net



« 1 2 (3) 4 »


Re: CMake progress
Just popping in
Joined:
2007/7/14 20:30
From Lothric
Posts: 222
@alfkil

I stumbled upon a problem where function always exists when it shouldn't, for example due to a linker failure. Below is a small example.

cmake_minimum_required(VERSION 3.7)
include(
CheckFunctionExists)  
check_function_exists(pink_unicorn HAVE_PINK_UNICORN
CHECK_FUNCTION_EXISTS(pink_elephant HAVE_PINK_ELEPHANT)


   Report Go to top

Re: CMake progress
Just can't stay away
Joined:
2009/10/7 0:11
From Copenhagen
Posts: 1168
@Capehill

This is probably because the code, that does the test compile/link does not always give you the correct return code. I will have to look into that.

   Report Go to top

Re: CMake progress
Just popping in
Joined:
2007/7/14 20:30
From Lothric
Posts: 222
@alfkil

Thank you. One thing that happened on my system was that linker couldn't find libdl.so. I'm not sure why this is on the default lib list but even when removing it from the list (and linker giving undefined references xyz), CMake still thinks function exists.

   Report Go to top

Re: CMake progress
Just can't stay away
Joined:
2009/10/7 0:11
From Copenhagen
Posts: 1168
@Capehill

How does this look? ;)

Resized Image

   Report Go to top

Re: CMake progress
Home away from home
Joined:
2006/11/26 21:45
From A haunted Castle somewhere in the Bavarian Mountains
Posts: 2799
@alfkil

cmake 3.7.1 release version

I have the same problem as i had with the pre-release

The readme states
Quote:

AmigaOS 4 HOWTO:

To use CMake, you need to expand the CLI path to include cmake. You also need to
set PATH for 'unix' path emulation.

Put these commands in your user-startup, or execute them before using cmake.

1) path drive:path/cmake-3.7.1/bin

2) If PATH is already set

setenv PATH $PATH:/drive/path/cmake-3.7.1/bin

Otherwise:

setenv PATH /SDK/c:/SDK/gcc/bin:/drive/path/cmake-3.7.1/bin


I did not have this "Unix" path setting, there was no PATH at all set in ENV/ENVARC, so i did set it according to the readme.

After that it refused to build any of my ports though, i got this error message everytime (given the fact that the projects all share the same codebase it's no wonder they all break, but i don't know the reason)

Quote:

Makefile.common:215: *** target pattern contains no `%'. Stop.

Where this is the line it breaks
Quote:

$(VERFILE): $(srcdir)/base/internal_version.h


It's the ScummVM codebase, btw

Btw: It doesn't matter WHAT i put in $PATH, i can put the mentioned line in there, let it be completely blank or set it to some rubbish, as long as a PATH file is actually available in ENV/ENVARC the projects *will* fall over.
(I tried)

If i remove the setenv line and remove any PATH file from ENV/ENVARC, the projects do build again.

Not so sure about cmake projects, i haven't tried any yet, but i can't really work with this if it kills my gmake projects...

I don't have any AmiCygnix stuff, only the normal SDK initialization stuff.

Of course there could be stuff done while configuring my projects, but as i said, there is and was no PATH set et al before...something is rotten in the state of Denmark.

_________________
If slaughterhouses had glass walls, everyone would be a vegetarian. ~ Sir Paul McCartney
-
Did everything just taste purple for a second? ~ Philip J. Fry
-
Ain't got no cash, ain't got no style, ladies vomit when I smile. ~ Dr. John Zoidberg
   Report Go to top

Re: CMake progress
Just popping in
Joined:
2007/7/14 20:30
From Lothric
Posts: 222
@Raziel

https://github.com/scummvm/scummvm/blob/master/Makefile.common

Can you debug the contents of DISTVERSION, a couple of lines above?

   Report Go to top

Re: CMake progress
Just popping in
Joined:
2007/7/14 20:30
From Lothric
Posts: 222
@alfkil

Cheers, will try it soon.

   Report Go to top

Re: CMake progress
Home away from home
Joined:
2006/11/26 21:45
From A haunted Castle somewhere in the Bavarian Mountains
Posts: 2799
@Capehill

Not sure what you want me to do

_________________
If slaughterhouses had glass walls, everyone would be a vegetarian. ~ Sir Paul McCartney
-
Did everything just taste purple for a second? ~ Philip J. Fry
-
Ain't got no cash, ain't got no style, ladies vomit when I smile. ~ Dr. John Zoidberg
   Report Go to top

Re: CMake progress
Just can't stay away
Joined:
2009/10/7 0:11
From Copenhagen
Posts: 1168
@Raziel

Have you tried creating a new build directory and trying to rebuild from scratch?

EDIT: It doesn't seem, that the ScummVM sourcebase have any files named CMakeLists.txt. How exactly are you using CMake for this project, and are you sure it is the right way to do things? For instance, the error you mention doesn't seem to have anything to do with cmake.

   Report Go to top

Re: CMake progress
Home away from home
Joined:
2006/11/26 21:45
From A haunted Castle somewhere in the Bavarian Mountains
Posts: 2799
@alfkil i'm not using cmake to build scummvm. my problem is that installing cmake (or better using $PATH) interferes with my gnumake ports. if i cannot use cmake without losing the possibility to build gnumake projects or to always switch between using $PATH and not.

   Report Go to top

Re: CMake progress
Just can't stay away
Joined:
2009/10/7 0:11
From Copenhagen
Posts: 1168
@Raziel

Ah, I completely misunderstood :).

Well, it must be a specific issue, there should be no reason why PATH should interfere with anything except things, that somehow relate to it in the wrong way.

My guess is that line 162 (or something similar) screws up, because gmake becomes confused about finding items. You might want to try running gmake from abc-shell or seeing, if anything in the path conflics with items, that are somehow needed by the build.

Could it be, that gmake has an internal search 'path' that is overruled by PATH if it is present?

EDIT: You could try running gmake on this makefile (from the same root position):

VERSION = $(shell cat "${srcdir}/base/internal_version.h" grep SCUMMVM_VERSION cut -d" -f2)

all:
    echo $(VERSION)



Edited by alfkil on 2017/3/13 18:50:32
   Report Go to top

Re: CMake progress
Just can't stay away
Joined:
2006/12/4 23:15
Posts: 1747
@alfkil

Quote:

Could it be, that gmake has an internal search 'path' that is overruled by PATH if it is present?


I don't think gmake uses PATH directly, but as the primary difference between gmake and make is to use 'sh' instead of amigaos shell then you can be sure that it's using via 'sh'.

PATH belongs to abc-shell any other app that messes with had better follow abc-shell's rules.

One thing that could trip stuff up is that PATH being an environment variable is global, so if the global var is changed it effects everything, whereas on most *nix systems changing the var only affects child processes.


_________________
Blender For OS4.x : Blues : Walker Broad
   Report Go to top

Re: CMake progress
Just can't stay away
Joined:
2006/12/4 23:15
Posts: 1747
@Raziel

OK I'm seeing what the problem is now as I read the thread backwards ,
You need to set your PATH to something sane before you add the cmake stuff.

To see what you need to set it (at a minimum) delete it then start an abc-shell session.

then type

echo $PATH

If PATH exists abc-shell will use it, if it doesn't it installs a default, so you need to recreate that default if you create the global envvar PATH.


[edit]
My path is set like so

New Shell process 8
8.AmigaOS4:> echo $PATH
/gcc/bin:/SDK/C:/C
8.AmigaOS4:> sh
/AmigaOS4>echo $PATH
.:/SDK/Local/C:/SDK/Local/newlib/bin:/gcc/bin:/SDK/C:/C
/AmigaOS4>

Notice that although abc-shell adds a few things to the default path (this is in my .abc-rc file IIRC) it adds to the existing PATH. So at minimum if you define PATH externally tou need to add the abc-shell internal default which is

/gcc/bin:/SDK/C:/C



_________________
Blender For OS4.x : Blues : Walker Broad
   Report Go to top

Re: CMake progress
Just popping in
Joined:
2007/7/14 20:30
From Lothric
Posts: 222
@alfkil

The new CMake fixed the issue I had. I just don't understand 1) why it wants to link with -ldl 2) why it doesn't find from SOBJS: where I have it?

My workaround was to remove -ldl for the time being (from CMake script).

Do you have a Paypal button somewhere?

   Report Go to top

Re: CMake progress
Just can't stay away
Joined:
2006/12/4 23:15
Posts: 1747
@Capehill

Quote:

2) why it doesn't find from SOBJS: where I have it?


SOBJS: is not where the linker looks for shared objects, SDK:newlib/libs and SDK:Local/newlib/libs is. You need to have links from your SDK directories to the SOBJS: versions (or separate copies)

If your SDK has been updated few times these can get messed up.

AS a side issue there is no static version of libdl ie no libdl.a only a libdl.so so if your project is expecting to link statically whilst using libdl for loading modules or some such it can't work you have to link dynamically of build in modules statically.


_________________
Blender For OS4.x : Blues : Walker Broad
   Report Go to top

Re: CMake progress
Just can't stay away
Joined:
2009/10/7 0:11
From Copenhagen
Posts: 1168
@Capehill

That is great news.

Go to Modules/Platform/AmigaOS.cmake. Here you can add/remove standard libraries, include dirs and library locations. I added -ldl and -lunix by default, because they are needed to build CMake. You can safely remove those, if you don't need them, although they will be necessary for many CMake projects.

I don't have a paypal donation proceedure at the moment, if that's what you are asking about. I'd like to create something big and lustrous before I ask for people's moneys. If you need to throw money away, go for broadblues, he has been answering all the questions asked in this thread :).

Thanks, by the way! :)

   Report Go to top

Re: CMake progress
Not too shy to talk
Joined:
2006/11/22 17:57
From Italy, Rome
Posts: 459
@Capehill

"The new CMake fixed the issue I had."

Sorry, i missed this.

There's a new version of cmake?

_________________
Retired
   Report Go to top

Re: CMake progress
Just can't stay away
Joined:
2009/10/7 0:11
From Copenhagen
Posts: 1168
@AmigaBlitter

Yes. Look on os4depot.net.

   Report Go to top

Re: CMake progress
Not too shy to talk
Joined:
2006/11/22 17:57
From Italy, Rome
Posts: 459
OK, thank you

Great work!

_________________
Retired
   Report Go to top

Re: CMake progress
Just popping in
Joined:
2007/7/14 20:30
From Lothric
Posts: 222
@alfkil @broadblues

I have also libdl.so (link) in the SDK. I mentioned SOBJS: because it's listed by CMake (or rather, /SObjs, see below). My problem with -ldl seems to be caused by CMake not using -use-dynld, thus GCC wants libdl.a. So I have to either add -use-dynld in CMake Amiga script or remove -ldl to workaround this.

/Code/svn/sdl2-amigaos4-code/trunk/_cmaketest2cmake ..
-- 
The C compiler identification is GNU 4.2.4
-- Check for working C compiler: /SDK/gcc/bin/gcc
-- Check for working C compiler: /SDK/gcc/bin/gcc -- broken
CMake Error at 
/Code/cmake-3.7.1/share/cmake-3.7/Modules/CMakeTestCCompiler.cmake:51 (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: /Code/svn/sdl2-amigaos4-code/trunk/_cmaketest2/CMakeFiles/CMakeTmp

  

  Run Build Command
:"/SDK/c/gmake" "cmTC_838f9/fast"

  
/SDK/C/gmake -f CMakeFiles/cmTC_838f9.dir/build.make
  CMakeFiles
/cmTC_838f9.dir/build

  gmake
[1]: Entering directory
  
`/Code/svn/sdl2-amigaos4-code/trunk/_cmaketest2/CMakeFiles/CMakeTmp'

  Building C object CMakeFiles/cmTC_838f9.dir/testCCompiler.c.obj

  /SDK/gcc/bin/gcc -o0 -o CMakeFiles/cmTC_838f9.dir/testCCompiler.c.obj -c
  /Code/svn/sdl2-amigaos4-code/trunk/_cmaketest2/CMakeFiles/CMakeTmp/testCCompiler.c


  Linking C executable cmTC_838f9

  /Code/cmake-3.7.1/bin/cmake -E cmake_link_script
  CMakeFiles/cmTC_838f9.dir/link.txt --verbose=1

  /SDK/gcc/bin/gcc -o0 CMakeFiles/cmTC_838f9.dir/testCCompiler.c.obj -o
  cmTC_838f9 -Wl,-rpath,/SObjs -ldl -lunix

  gmake[1]: Leaving directory
  
`/Code/svn/sdl2-amigaos4-code/trunk/_cmaketest2/CMakeFiles/CMakeTmp'

  

  

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


-- Configuring incomplete, errors occurred!

   Report Go to top


« 1 2 (3) 4 »



[Advanced Search]


Powered by XOOPS 2.0 © 2001-2016 The XOOPS Project