Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
 

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: How to compile in DSL< Next Oldest | Next Newest >
kwjake Offline





Group: Members
Posts: 26
Joined: May 2005
Posted: May 20 2005,01:52 QUOTE

How do I compile programs in DSL? What do I need?

Plz help!
Back to top
Profile PM 
Guest
Unregistered






Posted: May 20 2005,03:47 QUOTE

Try the gcc1.dsl extension, which contains gcc, g++, make, and the standard header files.  You may not be able to compile source packages that depend on libraries other than libm / libc standard because the header files of these other libraries are not included in DSL nor in gcc1.dsl.  You will have to retrieve these header files, place them somewhere, and use the -I (that is, "dash eye") option to append the location to where gcc/g++ will usually search.

If you are compiling something simple ("Hello, world!"), try the tcc (tiny C compiler) that comes with DSL.  But instead of doing #include <stdio.h>, you will have to do #include <tcclib.h>.  Also, you will have to inspect the header file /usr/lib/tcc/include/tcclib.h to see if all the functions you need are declared.  If not, you will have to declare the functions explicitly in your program.

For example, no math function is declared.  So if you want to use the sin() function, you should have the following line in your program:

    double sin(double x);

and then compile your program with the -lm (that is "dash ell em") option.  You can do this for any function that is not declared in tcclib.h but is known to be in the ANSI C standard libraries.
Back to top
kwjake Offline





Group: Members
Posts: 26
Joined: May 2005
Posted: May 20 2005,03:57 QUOTE

so where can I get the libm and libc at? How do I know which ones I need? I already have gcc (I think). When I try to compile somthing, I get:

Code Sample

loading cache ./config.cache
Checking for a BSD compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking whether make sets ${MAKE}... yes
Checking for working aclocal... missing
Checking for working autoconf... missing
Checking for working automake... missing
Checking for working autoheader... missing
Checking for working makeinfo... missing

Checking host system type... Configure: error: can not gess host type; you must specify one


Thanks for the help :D  !
Back to top
Profile PM 
clacker Offline





Group: Members
Posts: 570
Joined: June 2004
Posted: May 20 2005,12:18 QUOTE

kwjake, you're trying to compile tuxnes, right?  You need to get the gcc1.dsl, the dsl-dpkg.dsl, and gnu-utils.dsl packages.

Most programs can be compiled using the following three commands:

./configure
make
sudo make install

If the program is graphical, you will  need the X developement libraries as well.  Since tuxnes is graphical, get these libraries.  You can get them using apt-get, which is in the dsl-dpkg.dsl package also in the repository.  You set your /etc/apt/sources.list file to unstable from stable, and the run apt-get:

Code Sample
sudo su
beaver /etc/apt/sources.list
### change    deb http://ftp.us.debian.org/debian/ stable main non-free contrib
### to            deb http://ftp.us.debian.org/debian/ unstable main non-free contrib
apt-get update
apt-get install xlibs-dev
### if that failed you may need to run the next command as well
dpkg --force-overwrite -i /var/cache/apt/archive/*.deb
exit


If that worked, you're ready to try compiling again.  If it didn't, you needed to load the gnu-utils package first.  Try the command ./configure --help to get some information on the available options.   I used these options and it worked:

Code Sample
./configure --with-x --host=i386-linux-gnu
make
sudo make install
Back to top
Profile PM 
3 replies since May 20 2005,01:52 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

 
reply to topic new topic new poll
Quick Reply: How to compile in DSL

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code