PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

Free OpenACC Webinar

undefined reference to `__ctype_b with pgf90 5.2-4

 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling
View previous topic :: View next topic  
Author Message
jonatas



Joined: 27 Oct 2004
Posts: 1

PostPosted: Wed Jan 26, 2005 6:18 pm    Post subject: undefined reference to `__ctype_b with pgf90 5.2-4 Reply with quote

I am currently running RedHat Linux 9.0 with pgf90 pgf90 5.2-4. A user had the following error while copiling:

./HDF_lib/libmfhdf.a(error.o)(.text+0x2d): In function `strerror':
: `sys_errlist' is deprecated; use `strerror' or `strerror_r' instead
./HDF_lib/libmfhdf.a(error.o)(.text+0xe): In function `strerror':
: `sys_nerr' is deprecated; use `strerror' or `strerror_r' instead
./HDF_lib/libdf.a(hkit.o)(.text+0x66): In function `HDf2cstring':
: undefined reference to `__ctype_b'
pgf90-Fatal-linker completed with exit code 1

Is there a work around or a fix for this problem. Any feedback would be greatly appricated.
Back to top
View user's profile
mkcolg



Joined: 30 Jun 2004
Posts: 6213
Location: The Portland Group Inc.

PostPosted: Thu Jan 27, 2005 9:17 am    Post subject: Reply with quote

Hi Jonatas,

We do have a FAQ about the "__ctype_b" link error here. Some linux distributions use the more current symbol "__ctype_b_loc" while others use the older "__ctype_b" symbol. The mfhdf library was most likely built on a different system that uses "__ctype_b" instead of "__ctype_b_loc" as your Red Hat 9.0 distribution expects. Please try the work around stated in the FAQ. However if the source is available, your best option would be to recompile the library on the Red Hat 9.0.

- Mat
Back to top
View user's profile
jbernstein



Joined: 09 Mar 2006
Posts: 1

PostPosted: Thu Mar 09, 2006 3:42 pm    Post subject: FAQ Correction Reply with quote

In the FAQ the code for the ctype_wa.c is correct except the #include line is left without an argument. It should read

#include <ctype.h>
Back to top
View user's profile
mkcolg



Joined: 30 Jun 2004
Posts: 6213
Location: The Portland Group Inc.

PostPosted: Thu Mar 09, 2006 4:42 pm    Post subject: Reply with quote

Thanks for pointing this out. "<ctype.h>" is actually there but the person who wrote this forgot to change it to "&lt;ctype.h&gt;" so that the "<>" is not seen as a tag by the browser. I've passed this along and it should be fixed shortly.

- Mat
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling All times are GMT - 7 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © phpBB Group