LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   What packages are required for compiling source on Slack 13? (https://www.linuxquestions.org/questions/slackware-14/what-packages-are-required-for-compiling-source-on-slack-13-a-799819/)

lucmove 04-03-2010 03:55 PM

What packages are required for compiling source on Slack 13?
 
Hi. Can someone please tell me what packages are required for compiling source on Slack 13? Something is missing in my box and I get errors, I can't figure out what it is.

Thank you.

astrogeek 04-03-2010 04:19 PM

What are you compiling and what errors are you getting... help us help you.

GrapefruiTgirl 04-03-2010 04:31 PM

Generally speaking, you already have all the basic components needed to "compile from source" -- you have make, gcc, libc, etc..
However, whatever you are trying to compile should have some form of documentation with it, telling you what that particular software DEPENDS on. These dependencies (one or more) are probably what's missing, if your software is trying to compile against headers or libraries which are not included with Slack by default.

Check for a list of dependencies (pre-required to build the software), and like astrogeek said, tell us what you're trying to compile. :)

Sasha

lucmove 04-21-2010 02:01 AM

I am coming back to this thread. I had to give up for some time for a number of personal reasons. In short, sudden additional work and consequent lack of time. Now I'm at it again.

I am trying to compile qmail as per instructions provided by Life With Qmail, and this is the output I get:

Quote:

root@testing1:/package# cd /usr/local/src/netqmail-1.06
root@testing1:/usr/local/src/netqmail-1.06# make setup check
( cat warn-auto.sh; \
echo CC=\'`head -1 conf-cc`\'; \
echo LD=\'`head -1 conf-ld`\' \
) > auto-ccld.sh
cat auto-ccld.sh make-load.sh > make-load
chmod 755 make-load
cat auto-ccld.sh find-systype.sh > find-systype
chmod 755 find-systype
./find-systype > systype
( cat warn-auto.sh; ./make-load "`cat systype`" ) > load
chmod 755 load
cat auto-ccld.sh make-compile.sh > make-compile
chmod 755 make-compile
( cat warn-auto.sh; ./make-compile "`cat systype`" ) > \
compile
chmod 755 compile
( ( ./compile tryvfork.c && ./load tryvfork ) >/dev/null \
2>&1 \
&& cat fork.h2 || cat fork.h1 ) > fork.h
rm -f tryvfork.o tryvfork
./compile qmail-local.c
qmail-local.c:1:23: error: sys/types.h: No such file or directory
qmail-local.c:2:22: error: sys/stat.h: No such file or directory
In file included from qmail-local.c:19:
error.h:4:19: error: errno.h: No such file or directory
qmail-local.c: In function 'temp_fork':
qmail-local.c:37: error: 'errno' undeclared (first use in this function)
qmail-local.c:37: error: (Each undeclared identifier is reported only once
qmail-local.c:37: error: for each function it appears in.)
qmail-local.c: In function 'temp_read':
qmail-local.c:38: error: 'errno' undeclared (first use in this function)
qmail-local.c: In function 'temp_qmail':
qmail-local.c:42: error: 'errno' undeclared (first use in this function)
qmail-local.c: In function 'maildir_child':
qmail-local.c:85: error: storage size of 'st' isn't known
qmail-local.c:91: error: 'errno' undeclared (first use in this function)
qmail-local.c: In function 'mailfile':
qmail-local.c:183: error: 'errno' undeclared (first use in this function)
qmail-local.c: In function 'mailprogram':
qmail-local.c:247: error: 'errno' undeclared (first use in this function)
qmail-local.c: In function 'checkhome':
qmail-local.c:313: error: storage size of 'st' isn't known
qmail-local.c:316: error: 'errno' undeclared (first use in this function)
qmail-local.c: In function 'qmeox':
qmail-local.c:329: error: storage size of 'st' isn't known
qmail-local.c:338: error: 'errno' undeclared (first use in this function)
qmail-local.c: In function 'qmeexists':
qmail-local.c:348: error: storage size of 'st' isn't known
qmail-local.c:354: error: 'errno' undeclared (first use in this function)
qmail-local.c:361: error: 'S_IFMT' undeclared (first use in this function)
qmail-local.c:361: error: 'S_IFREG' undeclared (first use in this function)
qmail-local.c: In function 'main':
qmail-local.c:491: error: 'errno' undeclared (first use in this function)
qmail-local.c:450: warning: return type of 'main' is not 'int'
make: *** [qmail-local.o] Error 1

Richard Cranium 04-21-2010 02:27 AM

What do you see when you run the command...

Code:

grep sys/types.h /var/log/packages/*
...? You should see a glibc package containing that string. If not, you should install it.

(FWIW, if you had done a complete slackware install, then you should have everything.)

lucmove 04-21-2010 07:48 AM

That command gives empty output.

I have gcc-4.3.3, gcc-g++-4.3.3, glibc-profile-2.9, glibc-solibs-2.9, glibc-zoneinfo-2.9, make, kernel-headers and many other packages. I don't have a complete Slackware install because it is a VPZ template. Now I need to know what packages are probably missing. That's the reason of my question in the topic title.

Richard Cranium 04-21-2010 12:28 PM

On my system, you would be missing glibc-2.9-x86_64-3

lucmove 04-21-2010 12:44 PM

Quote:

Originally Posted by Richard Cranium (Post 3942906)
On my system, you would be missing glibc-2.9-x86_64-3

OK, I think that fixed it. Qmail seems to compile correctly now.

I have a script that downloads and installs commonly required packages and that one had been commented out for some reason, so it was missing.

Thank you.

lucmove 06-05-2010 05:52 PM

I had marked this thread SOLVED, but I have another related problem now. I am reinstalling qmail and cannot compile checkpassword-0.90. I get this error:

Code:

output blah blah blah...
rm -f trycrypt.o trycrypt
./load checkpassword prot.o unix.a byte.a  `cat \
        shadow.lib` `cat crypt.lib` `cat s.lib`
/usr/lib/gcc/i486-slackware-linux/4.3.3/../../../../i486-slackware-linux/bin/ld: errno: TLS definition in /lib/libc.so.6 section .tbss mismatches non-TLS reference in checkpassword.o
/lib/libc.so.6: could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [checkpassword] Error 1

What happened?

TIA.

Richard Cranium 06-05-2010 06:57 PM

Quote:

Originally Posted by lucmove (Post 3993754)
What happened?

You are compiling really old code (9 years old, as a matter of fact) that wasn't written to be portable. I would have thought that the designer could have used autoconf and automake.

In the file "error.h", comment out the line
Code:

extern int errno;
and add the line
Code:

#include <errno.h>
at the beginning of the file.

It will compile after that, but I don't know if the generated programs will segfault when you run them. I'm suspicious of the entire contents of "error.h" and "error.c".

Richard Cranium 06-05-2010 06:58 PM

Oh, a quick Google search pointed me to http://www.linuxquestions.org/questi...erence-588894/, which is where I got the answer that I gave you. (Well, I did make the changes to see what would work.)

lucmove 06-05-2010 07:06 PM

It works!
 
Quote:

Originally Posted by Richard Cranium (Post 3993797)
In the file "error.h", comment out the line
Code:

extern int errno;
and add the line
Code:

#include <errno.h>
at the beginning of the file.

It worked! Thank you. :)

Back into the SOLVED bin.


All times are GMT -5. The time now is 08:06 AM.