LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Problem in making pal on Linux Mint (https://www.linuxquestions.org/questions/programming-9/problem-in-making-pal-on-linux-mint-4175471834/)

Ehsanizadi 08-02-2013 05:09 AM

Problem in making pal on Linux Mint
 
Hi,

I am new to programming with C++, linux and also to PAL.
For my project I have to use PAL (Physics Abstraction Layer) and I am at the first steps of installing PAL.
Regarding the instructions stated at PAL website, I've done all the steps until the step no 6 (Make PAL core libraries: make libpal).
Once I type "make libpal" in the terminal, I receive this error:

Code:

==== Building libpal ====
make[1]: *** No rule to make target `../../pal_i/hull.cpp', needed by `obj/Debug/hull.o'.  Stop.
make: *** [libpal] Error 2

Note that I downloaded and used a tarball version of pal and tried it via SVN access, neither of them worked for me.

Thank you in advance,
Ehsan

knudfl 08-02-2013 07:14 AM

Welcome to LQ.

Assume /home/<name>/pal/
(From the $ svn co https://pal.svn.sourceforge.net/svnroot/pal pal ).

The meaning of § 5 , "cd build/gnu/" is :
a) $ cd pal/pal/
b) $ mkdir -p build/gnu/
c) $ cd build/gnu/
d) $ cmake ../../ ( Or $ CC=gcc-4.4 CXX=g++-4.4 cmake ../../ )
e) $ make libpal

? Any questions ? Then please specify your Ubuntu version :
I) $ uname -m
II) $ cat /etc/issue

-

Ehsanizadi 08-02-2013 07:34 AM

Confusing..., I didn't understand what should I do to solve this problem! or what is the source of the problem.

Anyhow, I use Linux Mint 15.

knudfl 08-02-2013 07:51 AM

Quote:

I didn't understand what should I do to solve this problem!
Or what is the source of the problem.
I think the instructions may be simplified ?
It is assumed that you know how to use 'cmake'. Default is :
When you see a file "CMakeLists.txt", make a build/ folder and do $ cmake ../
inside the build/ folder.

* But : Here we have an application that specifies "build/gnu/".
Which is required for the cmake files to work.

* Mint 15 : $ sudo apt-get install g++-4.4 cmake
.... and then use the suggested $ CC=gcc-4.4 CXX=g++-4.4 cmake ../../
( Instead of plain 'cmake ../../' ).

-

Ehsanizadi 08-02-2013 08:38 AM

In PAL website it is mentioned in order to install PAL on linux, "premake" should be used. (Note: according to the instructions of pal website, I used premake)
Is it possible to install PAL on linux using CMake? (actually, I didn't know that)

I have already used Cmake on windows, but have not tested it on linux.
In the case of installing pal using Cmake, I didn't get your point about:
Quote:

$ CC=gcc-4.4 CXX=g++-4.4 cmake ../../
What should I write instead of "../../"?
I guess it should be a path of file or something, could you provide an example for that?
Sorry, for my repetitive questions! I am really new to these.

knudfl 08-02-2013 10:28 AM

# 5 .

Please see post #1 : No rule to make target `../../pal_i/hull.cpp'

".." means one level up. Same as "../".
"../../" means two levels up in the directory tree.
Not to be replaced, but used as is.


But : May be you already have a Makefile ? From "premake".
I may have misunderstood the "premake" thing.
And I did not do this : "premake --file premake_generic.lua --target gnu".

-

Ehsanizadi 08-04-2013 11:47 AM

Quote:

Originally Posted by knudfl (Post 5001655)
# 5 .

Please see post #1 : No rule to make target `../../pal_i/hull.cpp'

".." means one level up. Same as "../".
"../../" means two levels up in the directory tree.
Not to be replaced, but used as is.


But : May be you already have a Makefile ? From "premake".
I may have misunderstood the "premake" thing.
And I did not do this : "premake --file premake_generic.lua --target gnu".

-

Well, I am following "premake" and its instructions!
Please see this.

John VV 08-04-2013 07:00 PM

in "cmake" all path are relative to the build folder
and that build folder CAN NOT be the source folder

hence the making of the folders "build/gnu"
NOW
fro cmake to include the "include.cmake" files the relative path from PWD is needed
hence the requirement of the ../../ FROM inside the build folder

cmake is NOT like the autotools "configure" and "make" it dose things differently

also looking on the page in the first post
it was last updated in Oct. 2008
---- Page modified on 26/10/08 -------

and is using the old "premake 3.7" from 2008
http://premake.sourceforge.net/download
http://sourceforge.net/projects/prem...urce=directory


All times are GMT -5. The time now is 09:33 PM.