LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 03-26-2010, 09:14 AM   #1
Alexvader
Member
 
Registered: Oct 2009
Location: Japan
Distribution: Arch, Debian, Slackware
Posts: 994

Rep: Reputation: 94
Build L3D in Slackware


Hi...

So... I have decided to start creating graphical apps for Linux... ( kind of a baby that says: "... I have decided that one day I will beat Usain Bolt in 100m sprint"... )

http://sourceforge.net/projects/libl3d/files/
http://libl3d.sourceforge.net/screenshots.html

Beware all developers of DirectX... the Empire of The Rising Sun is coming...

Anyway I am trying to compile L3D from Sourceforge, but i keep getting errors...

The most obvious thing I tried to correct in the Makefile was the place where to find X11 libraries...

Code:
CC=g++ -Wall -pedantic
L3D_INCLUDE=-I./include/
L3D_LDFLAGS=-L/usr/X11R6/lib64 -lGL -lGLU -lXxf86vm
L3D_OBJECTS= obj/screen.o obj/md2.o obj/texture.o obj/console.o obj/loop.o obj/camera.o obj/timer.o obj/maths.o obj/path.o obj/fpsplayer.o obj/aabb.o
PREFIX=/usr

all:    libL3D.a libL3D.so

libL3D.so:      $(L3D_OBJECTS)
        $(CC) -g -shared -Wl,-soname,libL3D.so -o libL3D.so.0.1.0 $(L3D_OBJECTS) -lc

libL3D.a: $(L3D_OBJECTS)
        ar rcs libL3D.a $(L3D_OBJECTS)

.PHONY: clean

clean:
        rm -f obj/*.o libL3D.a libL3D.so* *~ */*~ */*/*~
        cd examples && make clean && cd ..
        cd test && make clean && cd ..

.PHONY: install
install:
        install -c -m 644 libL3D.a $(PREFIX)/lib/libL3D.a
        install -c -m 644 libL3D.so.0.1.0 $(PREFIX)/lib/libL3D.so.0.1.0
        ln -sf $(PREFIX)/lib/libL3D.so.0.1.0 $(PREFIX)/lib/libL3D.so
        ln -sf $(PREFIX)/lib/libL3D.so.0.1.0 $(PREFIX)/lib/libL3D.so.0
        mkdir -p $(PREFIX)/include/L3D/
        install -c -m 644 include/L3D/*.h $(PREFIX)/include/L3D/
        mkdir -p $(PREFIX)/share/L3D/data/gfx
        install -c -m 644 data/gfx/*.* $(PREFIX)/share/L3D/data/gfx/

.PHONY: examples test
examples:
        cd examples && make && cd ..

test:
        cd test && make && cd ..

#Objects
obj/screen.o: src/screen.cpp include/L3D/screen.h
        $(CC) -c src/screen.cpp $(L3D_INCLUDE) -o obj/screen.o

obj/md2.o: src/md2.cpp include/L3D/md2.h
        $(CC) -c src/md2.cpp $(L3D_INCLUDE) -o obj/md2.o

obj/texture.o: src/texture.cpp include/L3D/texture.h
        $(CC) -c src/texture.cpp $(L3D_INCLUDE) -o obj/texture.o

obj/console.o: src/console.cpp include/L3D/console.h
        $(CC) -c src/console.cpp $(L3D_INCLUDE) -o obj/console.o

obj/loop.o: src/loop.cpp include/L3D/loop.h
        $(CC) -c src/loop.cpp $(L3D_INCLUDE) -o obj/loop.o

obj/camera.o: src/camera.cpp include/L3D/camera.h
        $(CC) -c src/camera.cpp $(L3D_INCLUDE) -o obj/camera.o

obj/timer.o: src/timer.cpp include/L3D/timer.h
        $(CC) -c src/timer.cpp $(L3D_INCLUDE) -o obj/timer.o

obj/maths.o: src/maths.cpp include/L3D/maths.h
        $(CC) -c src/maths.cpp $(L3D_INCLUDE) -o obj/maths.o

obj/path.o: src/path.cpp include/L3D/path.h obj/maths.o
        $(CC) -c src/path.cpp $(L3D_INCLUDE) -o obj/path.o

obj/fpsplayer.o: src/fpsplayer.cpp include/L3D/fpsplayer.h      obj/aabb.o obj/camera.o
        $(CC) -c src/fpsplayer.cpp $(L3D_INCLUDE) -o obj/fpsplayer.o

obj/aabb.o: src/aabb.cpp include/L3D/aabb.h obj/maths.o
        $(CC) -c src/aabb.cpp $(L3D_INCLUDE) -o obj/aabb.o
but I am not getting to build the stuff...

Code:
alex@iskandhar:~/Slackware3/srcPkg/libL3D/libL3D-0.1.2$ ls
CHANGELOG  COPYING  INSTALL  Makefile  PATCHING  README  TODO  data/  doc/  examples/  include/  obj/  src/  test/  version
alex@iskandhar:~/Slackware3/srcPkg/libL3D/libL3D-0.1.2$ make
g++ -Wall -pedantic -c src/screen.cpp -I./include/ -o obj/screen.o
In file included from ./include/L3D/L3D.h:29,
                 from src/screen.cpp:12:
./include/L3D/maths.h: In member function 'float L3DVector3::glVertex()':
./include/L3D/maths.h:161: warning: no return statement in function returning non-void
In file included from ./include/L3D/L3D.h:32,
                 from src/screen.cpp:12:
./include/L3D/md2.h: At global scope:
./include/L3D/md2.h:81: warning: 'typedef' was ignored in this declaration
./include/L3D/md2.h: In constructor 'MD2::MD2()':
./include/L3D/md2.h:133: warning: 'MD2::stateEnd' will be initialized after
./include/L3D/md2.h:128: warning:   'int MD2::numGLCommands'
./include/L3D/md2.h:147: warning:   when initialized here
In file included from ./include/L3D/L3D.h:38,
                 from src/screen.cpp:12:
./include/L3D/path.h: At global scope:
./include/L3D/path.h:20: warning: 'typedef' was ignored in this declaration
./include/L3D/path.h:25: warning: 'typedef' was ignored in this declaration
./include/L3D/path.h:69: error: extra qualification 'L3DPath::' on member 'Draw'
src/screen.cpp: In function 'bool L3DUseRootWindow()':
src/screen.cpp:163: warning: format '%d' expects type 'int', but argument 2 has type 'Display*'
src/screen.cpp:163: warning: format '%d' expects type 'int', but argument 3 has type 'Window'
src/screen.cpp:81: warning: unused variable 'dpyWidth'
src/screen.cpp:81: warning: unused variable 'dpyHeight'
src/screen.cpp:82: warning: unused variable 'i'
src/screen.cpp:85: warning: unused variable 'modes'
src/screen.cpp:86: warning: unused variable 'modeNum'
src/screen.cpp:88: warning: unused variable 'wmDelete'
make: *** [obj/screen.o] Error 1
alex@iskandhar:~/Slackware3/srcPkg/libL3D/libL3D-0.1.2$

Does anyone have any Idea of what is wrong here...?

I think it has to do with declarations and in header files... but is there a way to fix this in the Makefile...?

BRGDS

Alex
 
Old 03-26-2010, 11:44 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Quote:
Does anyone have any Idea of what is wrong here...?
The code is seven years old .. at least.

Just edit line 1 in the Makefile to : CC=g++-2.95 -Wall -pedantic
The g++-2.95 is only available on Debian Etch and CentOS 3.9 ,
And cannot be used on a modern OS.
'make' provides : libL3D.a libL3D.so.0.1.0
on Debian Etch, 32 Bits.
My 64 Bit computer said goodbye five hours ago, so the above
is all you can get today. ( If you send an email.)
.....
 
1 members found this post helpful.
Old 03-26-2010, 06:04 PM   #3
Alexvader
Member
 
Registered: Oct 2009
Location: Japan
Distribution: Arch, Debian, Slackware
Posts: 994

Original Poster
Rep: Reputation: 94
...Hi Knudfl

Guess I will try to build this in another PC with an older distro...

About the V Library...

http://prdownloads.sourceforge.net/vgui/v-1.90.tar.gz
http://prdownloads.sourceforge.net/v...a-patch.tar.gz

I have patched the thing and followed this howto....

http://www.aero.polimi.it/~mbdyn/dow...imOnDebian.txt

But somehow this fails to build also... have you already built this...?
This is required by EasyAnim...

http://www.aero.polimi.it/~mbdyn/download/easyanim.html

But I'm out of Luck...

Code:
alex@iskandhar:~/OpenFOAMH/l3d$ cd /home/alex/OpenFOAMH/home/vgui
alex@iskandhar:~/OpenFOAMH/home/vgui$ clear                      
alex@iskandhar:~/OpenFOAMH/home/vgui$ make
cd srcx ; make                            
make[1]: Entering directory `/home/alex/OpenFOAMH/home/vgui/srcx'
make[1]: *** No rule to make target `v_defs.h', needed by `/home/alex/home/vgui/obj/vapp.o'.  Stop.
make[1]: Leaving directory `/home/alex/OpenFOAMH/home/vgui/srcx'                                   
make: *** [srcx] Error 2                                                                           
alex@iskandhar:~/OpenFOAMH/home/vgui$ make clean                                                   
rm -f *.bak *~ *.tmp core *.o *.obj *.bkh v.tgz                                                    
for i in srcx appgen draw drawex examp iconed icons \                                              
                test tutor; do \                                                                   
                (cd $i; make clean); \                                                             
        done                                                                                       
make[1]: Entering directory `/home/alex/OpenFOAMH/home/vgui/srcx'                                  
rm -f *.bak *~ *.tmp core *.o *.obj                                                                
rm -f /home/alex/home/vgui/obj/vapp.o /home/alex/home/vgui/obj/vawinfo.o /home/alex/home/vgui/obj/vbaseitm.o /home/alex/home/vgui/obj/vbasewin.o /home/alex/home/vgui/obj/vbtncmd.o /home/alex/home/vgui/obj/vcanvas.o /home/alex/home/vgui/obj/canvas.o /home/alex/home/vgui/obj/vcbtncmd.o /home/alex/home/vgui/obj/vchkboxc.o /home/alex/home/vgui/obj/vclabelc.o /home/alex/home/vgui/obj/vcmd.o /home/alex/home/vgui/obj/vcmdpane.o /home/alex/home/vgui/obj/vcmdwin.o /home/alex/home/vgui/obj/vcmdprnt.o /home/alex/home/vgui/obj/vcolor.o /home/alex/home/vgui/obj/vcomboc.o /home/alex/home/vgui/obj/vcpdc.o /home/alex/home/vgui/obj/vdebug.o /home/alex/home/vgui/obj/vdialog.o /home/alex/home/vgui/obj/vfilesel.o /home/alex/home/vgui/obj/vfinddlg.o /home/alex/home/vgui/obj/vfont.o /home/alex/home/vgui/obj/vfontsel.o /home/alex/home/vgui/obj/vframec.o /home/alex/home/vgui/obj/vicon.o /home/alex/home/vgui/obj/vlabelc.o /home/alex/home/vgui/obj/vlistc.o /home/alex/home/vgui/obj/vmemdc.o /home/alex/home/vgui/obj/vmenu.o /home/alex/home/vgui/obj/vmodald.o /home/alex/home/vgui/obj/vnotice.o /home/alex/home/vgui/obj/vos.o /home/alex/home/vgui/obj/vpopmenu.o /home/alex/home/vgui/obj/vpsprntr.o /home/alex/home/vgui/obj/vprogrsc.o /home/alex/home/vgui/obj/vpsdc.o /home/alex/home/vgui/obj/vradioc.o /home/alex/home/vgui/obj/vreply.o /home/alex/home/vgui/obj/vrepldlg.o /home/alex/home/vgui/obj/vsliderc.o /home/alex/home/vgui/obj/vslist.o /home/alex/home/vgui/obj/vspinc.o /home/alex/home/vgui/obj/vstartup.o /home/alex/home/vgui/obj/vstatusp.o /home/alex/home/vgui/obj/vtextc.o /home/alex/home/vgui/obj/vtextcnv.o /home/alex/home/vgui/obj/vtexted.o /home/alex/home/vgui/obj/vtextinc.o /home/alex/home/vgui/obj/vtimer.o /home/alex/home/vgui/obj/vtipwin.o /home/alex/home/vgui/obj/vutil.o /home/alex/home/vgui/obj/vwindow.o /home/alex/home/vgui/obj/vxdc.o /home/alex/home/vgui/obj/vx2vkey.o /home/alex/home/vgui/obj/vynreply.o /home/alex/home/vgui/obj/aw3d.o /home/alex/home/vgui/obj/awsim3d.o /home/alex/home/vgui/obj/awscl3d.o /home/alex/home/vgui/obj/awsld3d.o                                                                                                            
make[1]: Leaving directory `/home/alex/OpenFOAMH/home/vgui/srcx'                                                                                                                    
make[1]: Entering directory `/home/alex/OpenFOAMH/home/vgui/appgen'                                                                                                                 
rm -f *.bak *~ *.tmp core *.o *.obj                                                                                                                                                 
rm -f /home/alex/home/vgui/obj/vgapp.o /home/alex/home/vgui/obj/vgcmdw.o /home/alex/home/vgui/obj/vgcode.o /home/alex/home/vgui/obj/vgmdlg.o /home/alex/home/vgui/obj/vgdlmdlg.o /home/alex/home/vgui/obj/vgcnv.o                                                                                                                                                       
make[1]: Leaving directory `/home/alex/OpenFOAMH/home/vgui/appgen'                                                                                                                  
make[1]: Entering directory `/home/alex/OpenFOAMH/home/vgui/draw'                                                                                                                   
rm -f *.bak *~ *.tmp core *.o *.obj                                                                                                                                                 
rm -f /home/alex/home/vgui/obj/vdrwapp.o /home/alex/home/vgui/obj/vdrwcnv.o /home/alex/home/vgui/obj/vdrwcmdw.o /home/alex/home/vgui/obj/vdrwdlg.o                                  
make[1]: Leaving directory `/home/alex/OpenFOAMH/home/vgui/draw'
make[1]: Entering directory `/home/alex/OpenFOAMH/home/vgui/drawex'
rm -f *.bak *~ *.tmp core *.o *.obj
rm -f /home/alex/home/vgui/obj/drawapp.o /home/alex/home/vgui/obj/drawcnv.o /home/alex/home/vgui/obj/drawcmdw.o
make[1]: Leaving directory `/home/alex/OpenFOAMH/home/vgui/drawex'
make[1]: Entering directory `/home/alex/OpenFOAMH/home/vgui/examp'
rm -f *.bak *~ *.tmp core *.o *.obj
rm -f /home/alex/home/vgui/obj/protoapp.o /home/alex/home/vgui/obj/mydialog.o /home/alex/home/vgui/obj/mymodal.o /home/alex/home/vgui/obj/mycanvas.o /home/alex/home/vgui/obj/mycmdwin.o
make[1]: Leaving directory `/home/alex/OpenFOAMH/home/vgui/examp'
make[1]: Entering directory `/home/alex/OpenFOAMH/home/vgui/iconed'
rm -f *.bak *~ *.tmp core *.o *.obj
rm -f /home/alex/home/vgui/obj/viedapp.o /home/alex/home/vgui/obj/viedcnv.o /home/alex/home/vgui/obj/viedcmdw.o /home/alex/home/vgui/obj/coldlg.o /home/alex/home/vgui/obj/brshdlg.o /home/alex/home/vgui/obj/imageio.o
make[1]: Leaving directory `/home/alex/OpenFOAMH/home/vgui/iconed'
make[1]: Entering directory `/home/alex/OpenFOAMH/home/vgui/icons'
rm -f *.bak *~ *.tmp core *.o *.obj
rm -f /home/alex/home/vgui/obj/icondemo.o
make[1]: Leaving directory `/home/alex/OpenFOAMH/home/vgui/icons'
make[1]: Entering directory `/home/alex/OpenFOAMH/home/vgui/test'
rm -f *.bak *~ *.tmp core *.o *.obj
rm -f /home/alex/home/vgui/obj/testapp.o /home/alex/home/vgui/obj/vtcanvas.o /home/alex/home/vgui/obj/vtcmdwin.o /home/alex/home/vgui/obj/vtcw2.o /home/alex/home/vgui/obj/vttogdlg.o /home/alex/home/vgui/obj/vtdialog.o
make[1]: Leaving directory `/home/alex/OpenFOAMH/home/vgui/test'
make[1]: Entering directory `/home/alex/OpenFOAMH/home/vgui/tutor'
rm -f *.bak *~ *.tmp core *.o *.obj
make[1]: Leaving directory `/home/alex/OpenFOAMH/home/vgui/tutor'
for i in obj contrib vopengl includex/v includew/v srcwin; do \
                (cd $i; rm -f *.bak *~ *.tmp core *.o *.obj); \
        done
rm -f bccide/*.bak bccide/*.tmp bccide/*.csm
rm -f bccide/*.dsw bccide/*.obr bccide/*.tr
rm -f watcom/*.bak watcom/*.tmp watcom/*/*.exe watcom/*/*.obj
rm -f watcom/*/*.map watcom/*/*.lib watcom/*/*.err watcom/*/*.sym
rm -f bccide/*.bak bccide/*.tmp bccide/*.\~* bccide/*.csm
alex@iskandhar:~/OpenFOAMH/home/vgui$ ls
Config.mk  Readme   bin/      configs/  copying      draw/    examp/     iconed/  includew/  lib/    obj/    objdll/  srcwin/  test/   vopengl/
Makefile   appgen/  bmp2vbm/  contrib/  copying.lib  drawex/  gnuwin32/  icons/   includex/  msvc6/  objdb/  objx/    srcx/    tutor/
alex@iskandhar:~/OpenFOAMH/home/vgui$ cp configs/ConfigM.mk Config.mk
alex@iskandhar:~/OpenFOAMH/home/vgui$ make
cd srcx ; make
make[1]: Entering directory `/home/alex/OpenFOAMH/home/vgui/srcx'
make[1]: *** No rule to make target `v_defs.h', needed by `/home/alex/home/vgui/obj/vapp.o'.  Stop.
make[1]: Leaving directory `/home/alex/OpenFOAMH/home/vgui/srcx'
make: *** [srcx] Error 2
alex@iskandhar:~/OpenFOAMH/home/vgui$
Is this another "oldie", like L3d, requiring "archeological" build system...?


BRGDS

Alex
 
Old 03-27-2010, 04:03 AM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
"v-1.90" :
/home/alex/OpenFOAMH/home/vgui : Your location.
This application is one of those with an unusual
structure, and with unusual paths in the Makefiles.

So the only accepted location is : /home/alex/home/vgui
.. so just do 'tar xvf <path-to>/v-1.90.tar.gz'
directly in "/home/alex/".

Unless of course you will rewrite all the Makefiles.

P.S. , 1 : Please read the top Makefile to see
"Available targets:" , line 42.

P.S. , 2 : The code is from 2003 (2002), gcc/g++ 4.4.1 work OK,
( I did not patch ) so this code is written to be perfect.
..... Some Linux OS will probably need the patch ...

"gcc/g++ 2.95" did tolerate sloppy code, that's one reason
for some ten year old code to require version 2.95.
.....

Last edited by knudfl; 03-28-2010 at 11:21 PM.
 
1 members found this post helpful.
Old 03-28-2010, 03:12 AM   #5
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Ref. post # 2 :
"gcc/g++ 2.95" is not available for x86_64.

The gcc/g++ version 3.2.3, which is also "old style"
is included in CentOS 3.9 .

I managed to build another 64 bits computer yesterday,
so I may try out the "libL3D" one day, x86_64.
.....
 
1 members found this post helpful.
Old 03-29-2010, 07:49 AM   #6
Alexvader
Member
 
Registered: Oct 2009
Location: Japan
Distribution: Arch, Debian, Slackware
Posts: 994

Original Poster
Rep: Reputation: 94
Hi Knudfl

I built V-1.90 Libs allright...

Followed yr advice about location of source tree, and made an Installable package... needed no patching at all, but it only built using Intel Compilers ... strange... I even used a fresh source tree, and edited the Config.mk... no avail... only under Intel...


...Anyway, I built EasyAnim using the built V-1.90 Vgui libs, and had to build them using Intel too... the referenced objects in VGui libraries were all Intel ... cstdio_Intel_... string_Intel_... no GNU allowed...


BRGDS

Alex
 
Old 03-29-2010, 08:52 AM   #7
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
http://connie.slackware.com/~alien/s...s/gcc34/pkg64/
> gcc34 , g++34.
I did this on Slackware 13 - 64 :
cd home/vgui/ , make all , make all CXX=g++34 , make all.
.. And it ended up that third time with no errors.
( But I don't know, if the libs are usable.)

'libL3D' : Made an experiment with the gcc/g++ 3.2.3 from
CentOS 3.9 yesterday : Modified it to work on Slamd 12.1-64.
( Renamed / removed conflicting files.)
Got the most compiled. The main binaries. The static library.
But not the shared library.
So I still hope, it will succeed on CentOS 3.9 64 Bits.
Will get the disks this week, I hope.
.....

Last edited by knudfl; 03-29-2010 at 08:57 AM.
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Want to build my own Slackware Live CD ! perry Slackware 15 09-13-2007 08:52 PM
Slackware build for dmraid? vonst Slackware 6 07-03-2006 05:06 AM
Build Anjuta 1.0.2 in Slackware 9.0? JoooN Slackware 0 03-31-2003 02:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:18 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration