PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

malformed object issue for 32-bit compile on Max OS/X

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



Joined: 22 Aug 2005
Posts: 36

PostPosted: Fri Mar 30, 2012 1:22 pm    Post subject: malformed object issue for 32-bit compile on Max OS/X Reply with quote

I'm trying for a 32-bit compile for some libraries, such as netcdf, mpich2, etc., on Mac OS X 10.8.0 with PGI 10.3.

The compilation fails consistently with the following error:

/usr/bin/ranlib: object: .xxx/yyy.a(zzz.o) malformed object (LC_SEGMENT command 0 filesize field greater than vmsize field)
ar: internal ranlib command failed

According an earlier post, I tried the flag "-Mnomod" to work around the libtool bug, but it didn't work for me, I still got the same error.

For example

./configure --prefix=$HOME/netcdf/netcdf-3.6.1_Darwin_pgi_i386 CC=pgcc CXX=pgcpp FC=pgf90 FCFLAGS=-Mnomod CFLAGS=-Mnomod CPPFLAGS=-DpgiFortran

Do I have to update "fnativerc" to add a "$" before "APPENDMOD" in the section for the f901 command at the same time?

And is there anything still missing?

Thanks

Jerry
Back to top
View user's profile
hongyon



Joined: 19 Jul 2004
Posts: 551

PostPosted: Mon Apr 02, 2012 10:36 am    Post subject: Reply with quote

Hi Jerry,

Yes, you will need to add $ for APPENDMOD. That was a typo, $ was missing.

Hongyon
Back to top
View user's profile
Jerryleo



Joined: 22 Aug 2005
Posts: 36

PostPosted: Mon Apr 02, 2012 6:51 pm    Post subject: Reply with quote

Hongyon,

Thanks for your reply.

Is it possbile to override the default 'fnativerc' with my own 'fnativerc' file located at home direcotry. Because I don't have write access to the PGI bin direcotry, I need to ask administrator to do it.

PS, I didn't find any information about -Mnomod option in user manual, what does it use for?

Thanks
Back to top
View user's profile
hongyon



Joined: 19 Jul 2004
Posts: 551

PostPosted: Tue Apr 03, 2012 7:58 am    Post subject: Reply with quote

Jerry,

I would suggest asking the admin to change the file because it would also benefit other users as well. If you'd rather find other solution, please email trs@pgroup.com, asking to forward your e-mail to me, then we will provide you with other workaround.

Thanks,
Hongyon
Back to top
View user's profile
Jerryleo



Joined: 22 Aug 2005
Posts: 36

PostPosted: Wed Apr 04, 2012 9:27 am    Post subject: Reply with quote

Thanks a lot :)

Both of two solutions works fine.

I still want to know whether if it is possible to use a custom settings to override the default settings in the configuration files in PGI bin directory?

Because one of annoying thing is that admin always forgot to run makelocalrc to update GCCDIR & GCCINC in localrc file after updating OS kernel and make compiler failure.
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