[CIG-SEISMO] BUG-SPECFEM3D-Basin: librt unavailable with Mac OS X

Signature science0.delphin at laposte.net
Wed Apr 20 02:14:43 PDT 2011


Dera Sir:

Please find hereafter a report about my failure to build SPECFEM3D-Basin with Mac OS X.

Please note I tried to create a new record in the CIG bug forum, but it failed because of an internal server error. Thsi si why I am sending you this message.


Kind regards,



Laurent Delphin, Dunkerque (EU)
LDVenture 

Space Systems, Sustainable Life, & Ecosystems Advisor
Research, Survey, Design, & Management


#========================================================================


I tried to install SPECFEM3D-Basin (the recent release: april 2011), but the make step of the process failed, because the rt (real time) library is not found. In fact, librt is not implemented in Mac Os X, and this is why it failed (-lrt is not effective by default).

Besides, SPECFEM3D-Globe succeeded with Mac OS X, however not yet tested so not run.
In consequence, and because the threads library included in Mac OS X (or Xcode) run well and was tested some months ago, this part of the SPECFEM3D-Basin should be modified: either suppress and replace it by appropriate library for example, or provide with the CIG package its own rt library.

Hardware/software used: Intel Core 2 Duo (i386, x86_64).
Mac Os X Snow Leopard (v. 10.6.7), Xcode v. 3.2.6. Compiler()s : the GNU compiler suite, provided with Xcode, or the just compiled and installed 4.6.0 version (seeming to run very well ... However, around seven hours to be build).



Additional information(s):
1. APPLE Maining Lists: Re: realtime librt.a
http://lists.apple.com/archives/unix-porting/2008/Oct/msg00001.html
Subject: Re: realtime librt.a 
From: Terry Lambert  
Date: Thu, 2 Oct 2008 17:13:37 -0700 
Delivered-to: email at hidden 

Delivered-to: email at hidden 
--------------------------------------------------------------------------------
On Oct 1, 2008, at 6:50 AM, Sebastiano Pomata wrote: 
Hi all, I was googling around and I found this post of another Apple list (http://lists.apple.com/archives/xcode-users/2008/Apr/msg00579.html ) of a person that encountered my same problem
I'm trying to build a simulator developed in my university (on Linux) and I get error by the linker that seems unable to find librt.a - in the code is used for clock_gettime() and I would like to know if there's a port of such library, or some other similar function that allows me to compile even on Mac OS X. 
librt.a is the System V name of the library containing the POSIX Advanced Realtime [RT} Option functions. The specific function you are asking about is part of the [TMR] option. If Mac OS X supported it, it would be in libSystem.B,dylib, not librt.a. The function in question is not supported by Mac OS X.
Your code should check to see whether optional to implement things above and beyond the UNIX standard are implemented in the target OS, and if they aren't, use a different interface.

The specific code test you should use in this case is:

#include 
#if defined(_POSIX_TIMERS) && (_POSIX_TIMERS - 200112L) >= 0L

// I am allowed to use the following vendor optional functions now:
// clock_getres()
// clock_gettime()
// clock_settime()
// nanosleep()
// timer_create()
// timer_delete()
// timer_getoverrun()
// timer_gettime()
// timer_settime()

...

#else

// I am not allowed to use the vendor optional functions listed above
// Here is my alternate implementation which avoids those functions

...

#endif

-- Terry
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Unix-porting mailing list (email at hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/unix-porting/email@hidden
This email sent to email at hidden 
--------------------------------------------------------------------------------
References: 
>realtime librt.a (From: Sebastiano Pomata ) 

Prev by Date: realtime librt.a 
Next by Date: building libfreetype as a framework 
Previous by thread: realtime librt.a 
Next by thread: building libfreetype as a framework 
Index(es): 
Date 
Thread

2. N/A

Une messagerie gratuite, garantie à vie et des services en plus, ça vous tente ?
Je crée ma boîte mail www.laposte.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://geodynamics.org/pipermail/cig-seismo/attachments/20110420/72cb2b29/attachment.htm 


More information about the CIG-SEISMO mailing list