LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Trouble with installing programs from source (https://www.linuxquestions.org/questions/linux-software-2/trouble-with-installing-programs-from-source-152315/)

xtree 03-01-2004 03:10 PM

Trouble with installing programs from source
 
Hello,
I am very new to Linux and I have to admit it's a hassle for me to install programs from source. I've tried it with a couple programs mplayer and libdx and although I try to follow instructions (I have read the LinuxQuestions guide to installing from source) it doesnt seem to work for me (I only have managed unpacking the arcvhives without trouble). Mplayer suggested that I dont have the right gcc version (I have the 2.96 version apparently) and stopped the install process and libdx passes the error that you can see below. Somebody suggested that I should install the development packages from my Fedora install disks but I cannot do that because the respective disk is corrupted (at least partially).
Can somebody suggest me what packages to install (Ive been to the gcc site but I cant work my way out :) or help me solve this issue?.

Thanks.


[drr@drr libdbx_1.0.3]$ make
gcc -g -c libdbx.c
libdbx.c:19:20: stdlib.h: No such file or directory
libdbx.c:20:20: string.h: No such file or directory
In file included from libdbx.c:22:
libdbx.h:26:19: stdio.h: No such file or directory
In file included from libdbx.c:22:
libdbx.h:41: error: syntax error before "FILE"
libdbx.h:41: warning: no semicolon at end of struct or union
libdbx.h:45: error: syntax error before '}' token
libdbx.h:121: error: syntax error before '*' token
In file included from libdbx.c:23:
define.h:25:19: stdio.h: No such file or directory
define.h:26:24: netinet/in.h: No such file or directory
define.h:27:20: unistd.h: No such file or directory
define.h:28:23: sys/types.h: No such file or directory
libdbx.c:33: error: syntax error before '*' token
libdbx.c:34: error: syntax error before '*' token
libdbx.c:35: error: syntax error before '*' token
libdbx.c:36: error: syntax error before '*' token
libdbx.c:37: error: syntax error before '*' token
libdbx.c:38: error: syntax error before '*' token
libdbx.c:40: error: syntax error before '*' token
libdbx.c: In function `dbx_open':
libdbx.c:58: error: `FILE' undeclared (first use in this function)
libdbx.c:58: error: (Each undeclared identifier is reported only once
libdbx.c:58: error: for each function it appears in.)
libdbx.c:58: error: `fp' undeclared (first use in this function)
libdbx.c:62: error: `NULL' undeclared (first use in this function)
libdbx.c: At top level:
libdbx.c:71: error: syntax error before '*' token
libdbx.c: In function `dbx_open_stream':
libdbx.c:72: error: invalid application of `sizeof' to an incomplete type
libdbx.c:75: error: dereferencing pointer to incomplete type
libdbx.c:75: error: `fp' undeclared (first use in this function)
libdbx.c:78: error: dereferencing pointer to incomplete type
libdbx.c:82: error: dereferencing pointer to incomplete type
libdbx.c:88: error: `NULL' undeclared (first use in this function)
libdbx.c:93: error: dereferencing pointer to incomplete type
libdbx.c:100: error: dereferencing pointer to incomplete type
libdbx.c: In function `dbx_close':
libdbx.c:114: error: `NULL' undeclared (first use in this function)
libdbx.c:114: error: dereferencing pointer to incomplete type
libdbx.c:120: error: dereferencing pointer to incomplete type
libdbx.c:121: error: dereferencing pointer to incomplete type
libdbx.c:122: error: dereferencing pointer to incomplete type
libdbx.c: In function `dbx_free_item':
libdbx.c:139: error: `NULL' undeclared (first use in this function)
libdbx.c: In function `dbx_get':
libdbx.c:188: error: `NULL' undeclared (first use in this function)
libdbx.c:190: error: dereferencing pointer to incomplete type
libdbx.c:196: error: dereferencing pointer to incomplete type
libdbx.c:202: error: dereferencing pointer to incomplete type
libdbx.c:202: error: dereferencing pointer to incomplete type
libdbx.c:203: error: dereferencing pointer to incomplete type
libdbx.c:203: error: dereferencing pointer to incomplete type
libdbx.c:203: error: dereferencing pointer to incomplete type
libdbx.c: In function `dbx_perror':
libdbx.c:218: error: `stderr' undeclared (first use in this function)
libdbx.c: In function `dbx_get_body':
libdbx.c:227: error: `NULL' undeclared (first use in this function)
libdbx.c:227: error: dereferencing pointer to incomplete type
libdbx.c:232: error: dereferencing pointer to incomplete type
libdbx.c: In function `dbx_get_email_body':
libdbx.c:240: error: `NULL' undeclared (first use in this function)
libdbx.c:240: error: dereferencing pointer to incomplete type
libdbx.c:245: error: dereferencing pointer to incomplete type
libdbx.c: In function `dbx_free_email_body':
libdbx.c:253: error: `NULL' undeclared (first use in this function)
libdbx.c: At top level:
libdbx.c:356: error: syntax error before '*' token
libdbx.c: In function `_dbx_getIndexes':
libdbx.c:361: error: `fp' undeclared (first use in this function)
libdbx.c:376: error: `dbx' undeclared (first use in this function)
libdbx.c: At top level:
libdbx.c:393: error: syntax error before '*' token
libdbx.c: In function `_dbx_getindex':
libdbx.c:400: error: `fp' undeclared (first use in this function)
libdbx.c:400: error: `pos' undeclared (first use in this function)
libdbx.c:407: error: `dbx' undeclared (first use in this function)
libdbx.c: At top level:
libdbx.c:437: error: syntax error before '*' token
libdbx.c: In function `_dbx_getitem':
libdbx.c:442: error: `NULL' undeclared (first use in this function)
libdbx.c:448: error: `flags' undeclared (first use in this function)
libdbx.c:454: error: `item' undeclared (first use in this function)
libdbx.c:464: error: `fp' undeclared (first use in this function)
libdbx.c:464: error: `pos' undeclared (first use in this function)
libdbx.c: At top level:
libdbx.c:621: error: syntax error before '*' token
libdbx.c: In function `_dbx_getBody':
libdbx.c:624: error: `x' undeclared (first use in this function)
libdbx.c:624: error: `NULL' undeclared (first use in this function)
libdbx.c:625: error: `ptr' undeclared (first use in this function)
libdbx.c:626: error: `fp' undeclared (first use in this function)
libdbx.c: At top level:
libdbx.c:644: error: syntax error before '*' token
libdbx.c: In function `_dbx_getstruct':
libdbx.c:651: error: `folder' undeclared (first use in this function)
libdbx.c:651: error: `NULL' undeclared (first use in this function)
libdbx.c:654: error: `fp' undeclared (first use in this function)
libdbx.c:654: error: `pos' undeclared (first use in this function)
libdbx.c: At top level:
libdbx.c:690: error: syntax error before '*' token
libdbx.c: In function `_dbx_getAtPos':
libdbx.c:691: error: `fp' undeclared (first use in this function)
libdbx.c:691: error: `pos' undeclared (first use in this function)
libdbx.c:691: error: `SEEK_SET' undeclared (first use in this function)
libdbx.c:695: error: `buf' undeclared (first use in this function)
libdbx.c:695: error: `size' undeclared (first use in this function)
libdbx.c: At top level:
libdbx.c:701: error: syntax error before '*' token
libdbx.c: In function `_dbx_get':
libdbx.c:702: error: `buf' undeclared (first use in this function)
libdbx.c:702: error: `size' undeclared (first use in this function)
libdbx.c:702: error: `fp' undeclared (first use in this function)
libdbx.c: In function `_dbx_get_from_buf':
libdbx.c:718: error: `NULL' undeclared (first use in this function)
make: *** [libdbx.o] Error 1
[drr@drr libdbx_1.0.3]$

Mega Man X 03-01-2004 03:41 PM

Hi xtree!!!

Welcome to the party buddy :). Well, it would be much better if instead of posting your "make" that you give us your ./configure instead. ./configure checks for the components installed at your computer and, only if ./configure do not returns errors, you should proceed with make (or whatever stands at the ReadMe doc).

I've never tried Fedora myself, but I doubt the gcc is 2.x. It has to be higher then that. Anyway, a great way of installing mplayer with Redhat's/Fedora is with apt-get. Apt-get is a package manager firstly created by Debian and today ported to many other distributions. How does it work? By simply typing apt-get install <name of the program> apt-get connects to servers, download the program and all dependencies for it and, indeed, install it for you... so if you want mplayer, type:

apt-get install mplayer

And consider it done!. You get apt-get here:

http://apt.freshrpms.net/

Make sure to read the docs and examples for a better usage of apt-get:

http://freshrpms.net/

Regards!

xtree 03-01-2004 03:53 PM

Configure
 
Hello Megaman,

Ive finally managed installing mplayer with apt. However I was trying to illustrate my incapacity with installing programs from source. I was led to believe and I tend to trust that if you want to stick with linux you d better learn installing from source. Now back to libdx theres no install file and also the readme doesnt deal with installation issues (I guess they assume its well known :))No configure file either. See below

Thanks for feedback


[drr@drr libdbx_1.0.3]$ ./configure
bash: ./configure: No such file or directory
[drr@drr libdbx_1.0.3]$

Mega Man X 03-01-2004 04:09 PM

yeah :) Learning to install programs with Linux from source is a great deal ;). First because you can install programs on any linux distributions instead of searching for packages for an specific distributions. And second, speed too. Compiling programs usually give a much better performance and optimization :). About libdbx, I'm not quite sure how to do, since I never had problems with it or.. if I had, I've installed from my CD's. A little tip though, when you face a dependency problem, you can easily fix it with apt-get. If you would like a graphical interface for apt-get type:

apt-get install synaptic

you can call that application at any time by typing synaptic. I use it to fix dependencies problems, then I compile the program I was trying to compile. Doing so I don't have to swap CD's (or even worse, try to find any of them in my trashed room). So, I'd recommend: If it's libraries dependencies, try fixing them with the packages from your CD's or apt-get/synaptic. If it's a program as mplayer and you want to get the hang of compiling, I'd suggest compiling it from source ;).

Good luck!

xtree 03-03-2004 06:42 AM

OK,

I figured it out at least for the begining. I've updated the gcc libraries using apt and also had to be logged in as root before running the make command, the next part was real easy..libdbx is looking good.


All times are GMT -5. The time now is 10:00 PM.