Raised This Month: $32 Target: $400
 8% 

Set up gcc-4.1, g++-4.1 and glibc?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Chrisber
AlliedModders Donor
Join Date: Jul 2007
Location: localhost
Old 12-26-2010 , 07:59   Set up gcc-4.1, g++-4.1 and glibc?
Reply With Quote #1

Hey,
I've read through the forums and read that SourceMod and SourceMM still uses gcc-4.1 (and so g++-4.1).
So I've installed them. Info: I'm using Debian Lenny.

Are this versions the correct ones?

Code:
chris@debian:~$ gcc-4.1 --version
gcc-4.1 (GCC) 4.1.3 20080704 (prerelease) (Debian 4.1.2-25)
Code:
chris@debian:~$ g++-4.1 --version
g++-4.1 (GCC) 4.1.3 20080704 (prerelease) (Debian 4.1.2-25)
Now I looked up and saw this:
Code:
chris@debian:~$ /lib/libc.so.6
GNU C Library stable release version 2.7, by Roland McGrath et al.
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 4.3.2.
Compiled on a Linux >>2.6.26-2-amd64<< system on 2010-10-21.
Available extensions:
    crypt add-on version 2.1 by Michael Glad and others
    GNU Libidn by Simon Josefsson
    Native POSIX Threads Library by Ulrich Drepper et al
    BIND-8.2.3-T5B
You see, it's compiled with 4.3.2.

Questions:

1. How can I compile a glibc with gcc-4.1 and g++-4.1?
2. How can I set up gcc-4.1 and g++-4.1 to be the standard compilers? (so that I can use "gcc" and "g++" simply?)
3. Is it ok to use the std::-libs from the compiler or should I use those from SourceMM?
4. Would you recommend me to switch to another linux system? For better compability?

Thanks!
Chrisber is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 12-26-2010 , 13:17   Re: Set up gcc-4.1, g++-4.1 and glibc?
Reply With Quote #2

Your environment will be fine.
For reference, here's what I use:
Code:
[root@fennec ~]# g++ --version
g++ (GCC) 4.4.5 20101112 (Red Hat 4.4.5-2)
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Code:
[root@fennec ~]# gcc --version
gcc (GCC) 4.4.5 20101112 (Red Hat 4.4.5-2)
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Code:
[root@fennec ~]# /lib/libc.so.6
GNU C Library stable release version 2.12.1, by Roland McGrath et al.
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 4.4.4 20100630 (Red Hat 4.4.4-10).
Compiled on a Linux 2.6.34 system on 2010-10-22.
Available extensions:
        The C stubs add-on version 2.1.2.
        crypt add-on version 2.1 by Michael Glad and others
        GNU Libidn by Simon Josefsson
        Native POSIX Threads Library by Ulrich Drepper et al
        BIND-8.2.3-T5B
        RT using linux kernel aio
libc ABIs: UNIQUE IFUNC
For bug reporting instructions, please see:
<http://www.gnu.org/software/libc/bugs.html>.
As far as libstdc++, never use it, use the classes included in MM:S / HL2SDK.
__________________
asherkin is offline
Chrisber
AlliedModders Donor
Join Date: Jul 2007
Location: localhost
Old 12-26-2010 , 14:07   Re: Set up gcc-4.1, g++-4.1 and glibc?
Reply With Quote #3

Yeah, but I ever thought that with a low gcc version you can provide much better compability? Or is that wrong?

And if I use gcc-4.1, I should also use a glibc which is compiled with gcc-4.1. I don't want to compile a plugin that only works on 20% of all servers :/

Thanks!
Chrisber is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 12-26-2010 , 14:21   Re: Set up gcc-4.1, g++-4.1 and glibc?
Reply With Quote #4

No server has ever had a problem with anything I've compiled, so meh.
__________________
asherkin is offline
BAILOPAN
Join Date: Jan 2004
Old 01-04-2011 , 01:23   Re: Set up gcc-4.1, g++-4.1 and glibc?
Reply With Quote #5

For distributing Linux binaries, we use gcc-4.1 because it's the lowest common denominator that any Valve game ships with. We can build everything on one slave. We also want to avoid linking to later libc versions, so we use Debian 4 or something (it could be 5 - I forget). Linux DLL hell sucks.
__________________
egg
BAILOPAN is offline
voogru
Inspector Javert
Join Date: Oct 2004
Old 01-11-2011 , 13:04   Re: Set up gcc-4.1, g++-4.1 and glibc?
Reply With Quote #6

Quote:
Originally Posted by BAILOPAN View Post
For distributing Linux binaries, we use gcc-4.1 because it's the lowest common denominator that any Valve game ships with. We can build everything on one slave. We also want to avoid linking to later libc versions, so we use Debian 4 or something (it could be 5 - I forget). Linux DLL hell sucks.
Linux has DLLs?

News to me.

voogru is offline
Chrisber
AlliedModders Donor
Join Date: Jul 2007
Location: localhost
Old 01-11-2011 , 13:12   Re: Set up gcc-4.1, g++-4.1 and glibc?
Reply With Quote #7

Of course. Wine!
Chrisber is offline
Thrawn2
Veteran Member
Join Date: Apr 2009
Old 01-11-2011 , 14:03   Re: Set up gcc-4.1, g++-4.1 and glibc?
Reply With Quote #8

wine makes my head hurt
__________________
einmal mit profis arbeiten. einmal.
Thrawn2 is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:44.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode