LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 08-12-2010, 12:55 PM   #1
jsookiki
LQ Newbie
 
Registered: Aug 2010
Posts: 3

Rep: Reputation: 0
stl_alloc.h gone missing in GCC4.x?


Hi everyone,
I am in the process of porting an application from a BSD platform onto a Linux box. When compiling, I have found that some of the header files call for '<bits/stl_alloc.h>', which is missing from my computer. Does anyone have any idea as to where I can find this and/or why it is missing? I am running a Fedora 12 machine with GCC4.4.4. Thanks so much for your help!
 
Old 08-12-2010, 03:39 PM   #2
David1357
Senior Member
 
Registered: Aug 2007
Location: South Carolina, U.S.A.
Distribution: Ubuntu, Fedora Core, Red Hat, SUSE, Gentoo, DSL, coLinux, uClinux
Posts: 1,302
Blog Entries: 1

Rep: Reputation: 107Reputation: 107
Quote:
Originally Posted by jsookiki View Post
When compiling, I have found that some of the header files call for '<bits/stl_alloc.h>', which is missing from my computer.
You should never include anything in "bits" directly. That is your real error. Figure out what header you should have really included and use that instead.
 
Old 08-12-2010, 03:56 PM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
" bits/stl_alloc.h " : Not seen since gcc-3.3.3 ( It's in the c++ files )

It is possible to install a "compat gcc33-c++ rpm" etc. to Fedora 12.
http://www.linuxquestions.org/questi...2-a-797763/#12

May be convenient for other reasons with such an old application.
( Other than the strange '#include <bits/stl_alloc.h>' ).
..
 
1 members found this post helpful.
Old 08-12-2010, 06:13 PM   #4
jsookiki
LQ Newbie
 
Registered: Aug 2010
Posts: 3

Original Poster
Rep: Reputation: 0
Ok I figured it was removed in an earlier version of GCC. So since many of my files depend on it, using GCC4.4.4 what can I use as a replacement to get my code to compile or will I need to rewrite all of it to bring it up to specification?
 
Old 08-12-2010, 09:22 PM   #5
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Quote:
Ok I figured it was removed in an earlier version of GCC
Why should it ? I have four (five) compilers on some Linux (Fedora 12)
# yum install compat-gcc34-gcc++ : version 3.4.6

And the Suse gcc33-c++ , Suse gcc41-c++ , etc.
( And of course the default gcc-c++ 4.4.2 ( or 4.4.4 )

These, at least 4, are meant to be installed at the same time.

But please read post # 2 again :
Quote:
You should never include anything in "bits" directly. That is your real error
 
Old 08-13-2010, 12:03 AM   #6
jsookiki
LQ Newbie
 
Registered: Aug 2010
Posts: 3

Original Poster
Rep: Reputation: 0
Yes, I realize that it is indeed possible to have multiple compilers running on the same system. However, that doesn't help me towards my end goal. I was given to task of porting this code over from a FreeBSD system to a Fedora 12 system and updating to current standards along the away. And for the include of the bits headers, I completely agree with you that they should never be included directly. However, I did not write this code myself and the person who did write it youused those includes directly and heavily relied on them. So my question is, when taking this code written for GCC3.3.x and moving it to modern day GCC4.4.4, is there anything that can mimic or replace the functionality of stl_alloc.h? Thanks so much for your replies!
 
Old 08-20-2010, 10:11 AM   #7
David1357
Senior Member
 
Registered: Aug 2007
Location: South Carolina, U.S.A.
Distribution: Ubuntu, Fedora Core, Red Hat, SUSE, Gentoo, DSL, coLinux, uClinux
Posts: 1,302
Blog Entries: 1

Rep: Reputation: 107Reputation: 107
Quote:
Originally Posted by jsookiki View Post
However, I did not write this code myself and the person who did write it used those includes directly and heavily relied on them.
So instead of taking this opportunity to fix the error you are going to perpetuate it. How sad.

Quote:
Originally Posted by jsookiki View Post
...is there anything that can mimic or replace the functionality of stl_alloc.h?
You might want to look in <bits/allocator.h> and see if the missing templates are in there. If you do not see what you need in there, try
Code:
# pushd /usr/include
# find . -name '*alloc*'
and look at all the relevant results.
 
Old 08-20-2010, 12:52 PM   #8
dwhitney67
Senior Member
 
Registered: Jun 2006
Location: Maryland
Distribution: Kubuntu, Fedora, RHEL
Posts: 1,541

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
Quote:
Originally Posted by jsookiki View Post
Yes, I realize that it is indeed possible to have multiple compilers running on the same system. However, that doesn't help me towards my end goal. I was given to task of porting this code over from a FreeBSD system to a Fedora 12 system and updating to current standards along the away. And for the include of the bits headers, I completely agree with you that they should never be included directly. However, I did not write this code myself and the person who did write it youused those includes directly and heavily relied on them. So my question is, when taking this code written for GCC3.3.x and moving it to modern day GCC4.4.4, is there anything that can mimic or replace the functionality of stl_alloc.h? Thanks so much for your replies!
Obviously you are attempting to compile the code, and the compiler complained that it could not find stl_alloc.h. Since then, I presume you have deleted that include statement from the code, and you are getting additional compiler errors. Will you please share what these are?

Without having a reference point to what functionality was provided by the deprecated stl_alloc.h file, it's hard to assist you in finding a substitute. Although, you may want to try including <memory>.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Gcc4.3 utanja Debian 0 06-04-2008 08:27 AM
gcc4.3 on slackware11 ? tclwp Slackware 2 03-03-2007 11:45 AM
Help with gcc4.0 js72 Debian 4 01-03-2007 05:51 AM
Missing libstdc++ / GCC4 Make Errors Kenji Miyamoto Slackware 2 05-27-2005 08:13 AM
Gcc4 hgnoel1980 Linux From Scratch 2 04-29-2005 03:42 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:00 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration