Koozali.org: home of the SME Server

How can i install a gcc development environment?[SOLVED]

recoco

How can i install a gcc development environment?[SOLVED]
« on: June 26, 2006, 11:21:55 AM »
I'm not about to install those rpms manually.I want to install by yum.
What can i do?Thank you!

solved!
hi,everbody,this is  the real SME/CentOS method to install gcc. :-)
Quote

[root@sme ~]# db yum_repositories setprop base status enabled
[root@sme ~]# db yum_repositories setprop base Visible yes
[root@sme ~]# db yum_repositories setprop centosplus Visible yes
[root@sme ~]# db yum_repositories setprop centosplus status enabled
[root@sme ~]# /sbin/e-smith/expand-template /etc/yum.conf
[root@sme ~]# yum install gcc gcc-c++

Offline byte

  • *
  • 2,183
  • +2/-0
How can i install a gcc development environment?[SOLVED]
« Reply #1 on: June 26, 2006, 11:06:55 PM »
Centos 4.3
--[byte]--

Have you filled in a Bug Report over @ http://bugs.contribs.org ? Please don't wait to be told this way you help us to help you/others - Thanks!

recoco

How can i install a gcc development environment?[SOLVED]
« Reply #2 on: June 27, 2006, 04:47:53 AM »
Thank you,Sir!
I had modified the yum.conf and enable CentOS.But still can'nt install GCCs from yum.Sorry,i'm not familiar with yum.
finally i install that manually.

mychael

How can i install a gcc development environment?[SOLVED]
« Reply #3 on: June 28, 2006, 12:49:33 AM »
HI !

Try this... but it's in French !!!

Ce n'est pas si souvent après tout !!!

http://nicoleau.fabien.free.fr/weblog/index.php?2006/05/22/7-compilation-c-c-sur-sme-7

Bon courage !

recoco

How can i install a gcc development environment?[SOLVED]
« Reply #4 on: June 28, 2006, 04:37:51 AM »
Quote from: "mychael"
HI !

Try this... but it's in French !!!

Ce n'est pas si souvent après tout !!!

http://nicoleau.fabien.free.fr/weblog/index.php?2006/05/22/7-compilation-c-c-sur-sme-7

Bon courage !


Great!Thanks!

Offline gregswallow

  • *
  • 651
  • +1/-0
Re: How can i install a gcc development environment?[SOLVED]
« Reply #5 on: October 01, 2006, 10:37:04 PM »
Quote from: "recoco"

hi,everbody,this is  the real SME/CentOS method to install gcc. :-)

No it isn't.

guest22

Re: How can i install a gcc development environment?[SOLVED]
« Reply #6 on: October 01, 2006, 11:18:43 PM »
Quote from: "gregswallow"

No it isn't.


I think a more descriptive directive/instruction/help would help here much more. This reaction only raises the obvious question... Why not post it right away?

Readers could get confused reading the titel [solved] but reading 'no it isn't'

guest

Offline gregswallow

  • *
  • 651
  • +1/-0
How can i install a gcc development environment?[SOLVED]
« Reply #7 on: October 02, 2006, 02:10:05 AM »
Well I didn't have time to go into more detail before.  

The standard answer when someone asks how to compile something on SME Server should be:
- Don't install a compiler on a production server as it's a security risk
- Use rpms already created for RHEL4/CentOS4 - there are thousands!
- If you need to build a custom rpm for SME7, it can and should be built on CentOS4.  If it is a smeserver-xxx or e-smith-xxx rpms that you need to rebuild, you just need to install e-smith-lib, e-smith-devtools and any perl rpms that are needed from SME7 on the CentOS4 box.  
- If you don't have a spare computer to install CentOS, attach a srpm to a bug report in the bug tracker and I bet someone with access to the build server would build it for you too.  That's another option.

The suggestion was also to enable the base and updates repository.  That is wrong, as yum would then get updates from there which may overwrite some rpms modifed for SME7 and/or install a newer kernel that we don't have kernel modules built for.  If you know what you are doing, you can install a rpm from CentOS (eg, logwatch, or something useful for a server, not gcc) this way:
yum --enablerepo=base --enablerepo=updates install rpmname

Offline FreakWent

  • ***
  • 85
  • +0/-0
thanks!
« Reply #8 on: November 30, 2006, 11:48:17 AM »
The text is unclear where the warnings are given about using updates, but the command given appears to include them? Did I miss something obvious?
Wouldn't be the first time.

bash-3.00$ sudo yum --enablerepo=base install mtx

Password:
Setting up Install Process
Setting up repositories
smeaddons                 100% |=========================|  951 B    00:00
base                      100% |=========================| 1.1 kB    00:00
smeos                     100% |=========================|  951 B    00:00
smeupdates                100% |=========================|  951 B    00:00
Reading repository metadata in from local files
primary.xml.gz            100% |=========================| 569 kB    00:12

[.....]


Running Transaction
  Installing: mtx                          ######################### [1/1]

Installed: mtx.i386 0:1.2.18-5
Complete!




Sweet!
Great!

Offline william_syd

  • ****
  • 1,608
  • +0/-0
  • Nothing to see here.
    • http://www.magicwilly.info
How can i install a gcc development environment?[SOLVED]
« Reply #9 on: November 30, 2006, 01:03:08 PM »
3 repositories are enabled by default (this may change in days to come)

To disable them on a temp basis use --disablerepo=
Regards,
William

IF I give advise.. It's only if it was me....

Offline cool34000

  • *
  • 339
  • +0/-0
How can i install a gcc development environment?[SOLVED]
« Reply #10 on: December 03, 2006, 01:08:26 PM »
To be clear :
Code: [Select]
#yum --enablerepo=base --enablerepo=centosplus install rpmname=> Install 'rpmname' using repository 'base' and 'centosplus', but only for this shot... This is temporary

Code: [Select]
#db yum_repositories setprop base status enabled
#db yum_repositories setprop base Visible yes
#db yum_repositories setprop centosplus Visible yes
#db yum_repositories setprop centosplus status enabled
#/sbin/e-smith/expand-template /etc/yum.conf
=> This is permanent settings, the next time you wil use the webpanel in the server-manager to update your server or if you type
Code: [Select]
#yum updateyour server will get updates that have not been compiled for him !
Don't use as permanent repositories BASE and CENTOSPLUS !

Offline william_syd

  • ****
  • 1,608
  • +0/-0
  • Nothing to see here.
    • http://www.magicwilly.info
How can i install a gcc development environment?[SOLVED]
« Reply #11 on: December 03, 2006, 01:52:42 PM »
Quote from: "cool34000"

Don't use as permanent repositories BASE and CENTOSPLUS !


http://bugs.contribs.org/show_bug.cgi?id=1849
Regards,
William

IF I give advise.. It's only if it was me....

simnux

How can i install a gcc development environment?[SOLVED]
« Reply #12 on: February 08, 2007, 04:14:46 AM »
Okay, keeping in mind all the usual warnings about not installing a compile environment on a production server, use CentOS, get an RPM, etc -- here is what I use when I absolutely must have something. Such as a stupid app that the user insists on that insists on being able recompile modules on the fly. Grrrr...

Anyway...

The following two yum commands will establish a basic development environment on SME Server 7.1. Accept the dependencies for both commands. Note this works for what I need/want to do. You may need to adjust a few packages here and there to suit your purposes. Also note that 7.0 will require you to use --enablerepo= as described in previous posts. But then, everyone is updating to 7.1, right...?

Code: [Select]

# yum install anaconda anaconda-runtime

# yum install autoconf automake bison cpp e2fsprogs-devel gcc gcc-c++ glibc-devel glibc-headers glibc-kernheaders httpd-devel kernel-devel kernel-smp-devel krb5-devel libacl-devel libattr-devel libstdc++-devel libtermcap-devel libtool m4 ncurses-devel openssl-devel pam-devel readline-devel zlib-devel


After the above there is no need to do the post commands suggested by the SME yum wrapper.

I also happen to need GD for this app, and GD.pm, so to the above "base" I add the following:

Code: [Select]
# yum install gd gd-devel gd-progs libpng-devl libjpeg-devel freetype-devel

Once that's done you can get GD.pm from here:

http://search.cpan.org/~lds/GD-2.35/GD.pm

I've found that the cpan install is problematic, so I build it manually. This is so I can exclude the XPM/X11 support, which of course is not present on SME. So first I extract the GD archive into /tmp/gd, then I run this:

Code: [Select]
# perl Makefile.PL -options "JPEG,FT,PNG,GIF,ANIMGIF"

This excludes XPM support; however, there is a bug in that this still leaves the -lXpm and -lX11 arguments in the Makefile.

Code: [Select]
# vi Makefile

And remove the -lX* options.

Now you can run the make / make test / etc as described in the GD.pm docs.

Hope this helps.

Oh, and as Greg pointed out (I don't use these, but if you're building SME packages you'll probably want them):

Quote
If it is a smeserver-xxx or e-smith-xxx rpms that you need to rebuild, you just need to install e-smith-lib, e-smith-devtools and any perl rpms that are needed from SME7 on the CentOS4 box.

[/i]