Hello. I tried to compile a program (plugger), but I don't have *any* sort of compiler installed. This is on Cent5.3.
So, I used Package Manager, concentrating on gcc. But, it seems that I have a choice, thus: gcc-4.1.2-46.el5.i386 gcc-4.1.2-46.el5_4.1.i386 gcc-4.1.2-46.el5_4.2.i386 gcc-c++-4.1.2-46.el5.i386 gcc-c++-4.1.2-46.el5_4.1.i386 gcc-c++-4.1.2-46.el5_4.2.i386 ... along with some others (Fortran, Ada, Java, and Obj-C).
I'm thinking that I need only 1 'flavor' (say, gcc-4.1.2-46.el5.i386 and gcc-c++-4.1.2-46.el5.i386) - correct?
I tried a google.com/linux search - the only link that seemed helpful was http://gcc.gnu.org/ -- where I found only this: "The core distribution includes the C language front end as well as the shared components." I have no clue which package would be the FE, and what the shared components are. Perhaps 1 of those packages is the core?
At Sat, 08 May 2010 09:23:32 -0400 CentOS mailing list centos@centos.org wrote:
Hello. I tried to compile a program (plugger), but I don't have *any* sort of compiler installed. This is on Cent5.3.
So, I used Package Manager, concentrating on gcc. But, it seems that I have a choice, thus: gcc-4.1.2-46.el5.i386 gcc-4.1.2-46.el5_4.1.i386 gcc-4.1.2-46.el5_4.2.i386 gcc-c++-4.1.2-46.el5.i386 gcc-c++-4.1.2-46.el5_4.1.i386 gcc-c++-4.1.2-46.el5_4.2.i386 ... along with some others (Fortran, Ada, Java, and Obj-C).
I'm thinking that I need only 1 'flavor' (say, gcc-4.1.2-46.el5.i386 and gcc-c++-4.1.2-46.el5.i386) - correct?
You just need to do 'yum install gcc gcc-c++ binutils glibc-devel'. You might also need to do a 'yum install make autoconf automake libtool' as well, depending on what Plugger uses as it build system (and what else you don't have installed). You might also need various ???-devel packages as well.
I tried a google.com/linux search - the only link that seemed helpful was http://gcc.gnu.org/ -- where I found only this: "The core distribution includes the C language front end as well as the shared components." I have no clue which package would be the FE, and what the shared components are. Perhaps 1 of those packages is the core? _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
On 9 May 2010 12:57, Michael Klinosky mpk2@enter.net wrote:
Robert Heller wrote:
You just need to do 'yum install gcc gcc-c++ binutils glibc-devel'.
That seems to have done the trick. I do get compile errors, but I think there's a problem with the code.
Depending on the requirements of the source code you are trying to compile you might have to fetch some development packages for various libraries, for example if it uses ncurses, you will want ncurses-devel package.
Hakan Koseoglu wrote:
Depending on the requirements of the source code you are trying to compile you might have to fetch some development packages for various libraries, for example if it uses ncurses, you will want ncurses-devel package.
This problem seems (to my semi-newby brain) to be related to X --
[root@sr1220 plugger-5.1.3]# make gcc -c -O2 -Ipluginsdk/include -INONE -DXP_UNIX -DVERSION="5.1.3" -fPIC -o plugger.o plugger.c In file included from plugger.c:43: pluginsdk/include/npapi.h:129:22: error: X11/Xlib.h: No such file or directory In file included from plugger.c:43: pluginsdk/include/npapi.h:148: error: expected specifier-qualifier-list before ‘Display’ plugger.c:48:19: error: X11/X.h: No such file or directory plugger.c:49:21: error: X11/Xos.h: No such file or directory plugger.c:50:27: error: X11/Intrinsic.h: No such file or directory plugger.c:51:23: error: X11/Xatom.h: No such file or directory plugger.c:76: error: expected specifier-qualifier-list before ‘Display’ plugger.c: In function ‘my_fork’: plugger.c:231: error: ‘struct data’ has no member named ‘flags’ plugger.c:232: error: ‘struct data’ has no member named ‘display’ ... and a bunch more errors (which are probably due to these).
I emailed the coder yesterday - still waiting for a reply.
Am 09.05.2010 17:48, schrieb Michael Klinosky:
Hakan Koseoglu wrote:
Depending on the requirements of the source code you are trying to compile you might have to fetch some development packages for various libraries, for example if it uses ncurses, you will want ncurses-devel package.
This problem seems (to my semi-newby brain) to be related to X --
[root@sr1220 plugger-5.1.3]# make gcc -c -O2 -Ipluginsdk/include -INONE -DXP_UNIX -DVERSION="5.1.3" -fPIC -o plugger.o plugger.c In file included from plugger.c:43: pluginsdk/include/npapi.h:129:22: error: X11/Xlib.h: No such file or directory In file included from plugger.c:43: pluginsdk/include/npapi.h:148: error: expected specifier-qualifier-list before ‘Display’ plugger.c:48:19: error: X11/X.h: No such file or directory plugger.c:49:21: error: X11/Xos.h: No such file or directory plugger.c:50:27: error: X11/Intrinsic.h: No such file or directory plugger.c:51:23: error: X11/Xatom.h: No such file or directory plugger.c:76: error: expected specifier-qualifier-list before ‘Display’ plugger.c: In function ‘my_fork’: plugger.c:231: error: ‘struct data’ has no member named ‘flags’ plugger.c:232: error: ‘struct data’ has no member named ‘display’ ... and a bunch more errors (which are probably due to these).
I emailed the coder yesterday - still waiting for a reply.
You need to install an additional -devel packages.
yum provides */Xlib.h
libX11-devel-1.0.3-11.el5.x86_64 : X.Org X11 libX11 Entwicklungspaket Repo : base Matched from: Filename : /usr/include/X11/Xlib.h
Same result for all the other missinge includes.
Alexander
Michael Klinosky wrote:
Alexander Dalloz wrote:
You need to install an additional -devel packages.
Given a list of 10 choices, that would've been at the bottom. I _never_ would have guessed!
yum provides */Xlib.h
Thank you for today's linux lesson. I'm just delving into compiling programs.
This isn't really 'linux' specific. It relates to the way distributions are packaged. If you don't compile things locally, you don't need all the .h header files so they are split into separate package-devel packages. You can get a bunch of them at once if you pick the development-related groups during an install or you can do a 'yum grouplist', then 'yum groupinstall ...' for the ones you are likely to need.
Les Mikesell wrote:
You can get a bunch of them at once if you pick the development-related groups during an install or you can do a 'yum grouplist', then 'yum groupinstall ...' for the ones you are likely to need.
Benjamin suggested that also.
But, I don't really want tons of extra stuff on my machine. And, I think that it actually worked out better; I now know the underlying problem, and how to solve it. If I would've used 'groupinstall', it would have worked, but I wouldn't have known about the missing library.
So, the next time I compile a program, I'll think back to this and realize that, most likely, I'm missing a library or somesuch.
I installed libX11-devel, then tried again to make - failed, but for a different library. I found it, installed it, 'make', and it succeeded.
Basically, I want to know how these things work.
Michael,
On 9 May 2010 16:48, Michael Klinosky mpk2@enter.net wrote:
Hakan Koseoglu wrote:
Depending on the requirements of the source code you are trying to compile you might have to fetch some development packages for various libraries, for example if it uses ncurses, you will want ncurses-devel package.
This problem seems (to my semi-newby brain) to be related to X --
[root@sr1220 plugger-5.1.3]# make gcc -c -O2 -Ipluginsdk/include -INONE -DXP_UNIX -DVERSION="5.1.3" -fPIC -o plugger.o plugger.c In file included from plugger.c:43: pluginsdk/include/npapi.h:129:22: error: X11/Xlib.h: No such file or directory
You need to get familiar with how C libraries work.
You are trying to compile a package which calls the Xlib library. The definitions for the library (i.e., what methods and functions are available to programmer) is stored in a file called header file which ends with the extension h.
In most distributions, these are stored separately to the libraries (i.e., runtime only dependencies).
If you do a search for your missing header file with the command
yum provides *X11/Xlib.h
you will see that this is provided with the libX11-devel package. Then you can install this package with the command
yum install libX11-devel
and so on for all of your missing dependencies.
I emailed the coder yesterday - still waiting for a reply.
This is nothing to do with the coder. I think you will wait for a while for the reply. :)
At Sun, 09 May 2010 11:48:53 -0400 CentOS mailing list centos@centos.org wrote:
Hakan Koseoglu wrote:
Depending on the requirements of the source code you are trying to compile you might have to fetch some development packages for various libraries, for example if it uses ncurses, you will want ncurses-devel package.
This problem seems (to my semi-newby brain) to be related to X --
[root@sr1220 plugger-5.1.3]# make gcc -c -O2 -Ipluginsdk/include -INONE -DXP_UNIX -DVERSION="5.1.3" -fPIC -o plugger.o plugger.c In file included from plugger.c:43: pluginsdk/include/npapi.h:129:22: error: X11/Xlib.h: No such file or directory In file included from plugger.c:43: pluginsdk/include/npapi.h:148: error: expected specifier-qualifier-list before Â`Display´ plugger.c:48:19: error: X11/X.h: No such file or directory plugger.c:49:21: error: X11/Xos.h: No such file or directory plugger.c:50:27: error: X11/Intrinsic.h: No such file or directory plugger.c:51:23: error: X11/Xatom.h: No such file or directory plugger.c:76: error: expected specifier-qualifier-list before Â`Display´ plugger.c: In function Â`my_fork´: plugger.c:231: error: Â`struct data´ has no member named Â`flags´ plugger.c:232: error: Â`struct data´ has no member named Â`display´ ... and a bunch more errors (which are probably due to these).
I emailed the coder yesterday - still waiting for a reply.
This should get you all of the X11 header files and link libraries (probably more than you need):
yum install libX11-devel xorg-x11-proto-devel libXau-devel libXdmcp-devel
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
On 05/08/2010 06:23 AM, Michael Klinosky wrote:
Hello. I tried to compile a program (plugger), but I don't have *any* sort of compiler installed. This is on Cent5.3.
[...]
I tried a google.com/linux search - the only link that seemed helpful was http://gcc.gnu.org/ -- where I found only this: "The core distribution includes the C language front end as well as the shared components." I have no clue which package would be the FE, and what the shared components are. Perhaps 1 of those packages is the core?
I would use a group install rather than messing around package by package. As root run:
yum groupinstall 'Development Libraries' 'Development Tools'
Benjamin Franz wrote:
On 05/08/2010 06:23 AM, Michael Klinosky wrote:
Hello. I tried to compile a program (plugger), but I don't have *any* sort of compiler installed. This is on Cent5.3.
I would use a group install rather than messing around package by package. As root run:
yum groupinstall 'Development Libraries' 'Development Tools'
indeed, as you typically not only need the compiler itself, but the build tool suite, as well as libraries for various things, and assorted utilities. The above groupinstall command gets you very far down the path, although it does load quite a large number of packages (on a slow link, it could take several hours).