invalid conversion from 'char* (*)(int, int)' to 'int32_t'

41 views
Skip to first unread message

Ryan Schmidt

unread,
Oct 6, 2010, 6:17:45 AM10/6/10
to pure...@googlegroups.com
On my machines running Mac OS X 10.4 Tiger, I can't build pure 0.44:


runtime.cc: In function 'void pure_tzset()':
runtime.cc:11164: error: invalid conversion from 'char* (*)(int, int)' to 'int32_t'
runtime.cc:11164: error: initializing argument 1 of 'pure_expr* pure_int(int32_t)'
make: *** [runtime.o] Error 1


I'm guessing this has less to do with Tiger and more to do with the fact that these machines are still running llvm 2.6 because llvm 2.7 doesn't want to build on Tiger.


Albert Graef

unread,
Oct 7, 2010, 6:28:13 AM10/7/10
to pure...@googlegroups.com

This doesn't have anything to do with LLVM, it's a POSIX incompatibility
of OSX. However, configure should check for this and work around it on
systems which don't have the timezone and daylight variables. On FreeBSD
this works ok:

http://code.google.com/p/pure-lang/issues/detail?id=30

I don't see why it shouldn't work on OSX. Can you please send your
config.h and config.log so that we can see what's going on there?

Albert

--
Dr. Albert Gr"af
Dept. of Music-Informatics, University of Mainz, Germany
Email: Dr.G...@t-online.de, a...@muwiinfa.geschichte.uni-mainz.de
WWW: http://www.musikinformatik.uni-mainz.de/ag

Ryan Schmidt

unread,
Oct 7, 2010, 9:24:21 PM10/7/10
to pure...@googlegroups.com
On Oct 7, 2010, at 05:28, Albert Graef wrote:
> Ryan Schmidt wrote:
>> On my machines running Mac OS X 10.4 Tiger, I can't build pure 0.44:
>> runtime.cc: In function 'void pure_tzset()':
>> runtime.cc:11164: error: invalid conversion from 'char* (*)(int, int)' to 'int32_t'
>> runtime.cc:11164: error: initializing argument 1 of 'pure_expr* pure_int(int32_t)'
>> make: *** [runtime.o] Error 1
>>
>> I'm guessing this has less to do with Tiger and more to do with the fact that these machines are still running llvm 2.6 because llvm 2.7 doesn't want to build on Tiger.
>
> This doesn't have anything to do with LLVM, it's a POSIX incompatibility
> of OSX.

Oh! Ok. Indeed, Mac OS X 10.5 was the version to be properly POSIX compliant.

> However, configure should check for this and work around it on
> systems which don't have the timezone and daylight variables. On FreeBSD
> this works ok:
>
> http://code.google.com/p/pure-lang/issues/detail?id=30
>
> I don't see why it shouldn't work on OSX. Can you please send your
> config.h and config.log so that we can see what's going on there?


Sure, here you go.

config.tar.gz

Albert Graef

unread,
Oct 8, 2010, 3:34:23 AM10/8/10
to pure...@googlegroups.com
Ryan Schmidt wrote:
>> I don't see why it shouldn't work on OSX. Can you please send your
>> config.h and config.log so that we can see what's going on there?
>
> Sure, here you go.

Well, according to the log the configure check in fact succeeds. Which
means that there must be a daylight variable somewhere in the library,
even though it isn't documented anywhere. Looks like Tiger goes a long
way to pretend it's got a working tzset. ;-)

I've hardened the test now, it now uses the C++ compiler which should be
able to throw out the type mismatch on the bogus timezone value, to
actually make the compile fail on Tiger. This is in r3593.

Could you please try again with the latest from svn?

Ryan Schmidt

unread,
Oct 10, 2010, 6:06:10 AM10/10/10
to pure...@googlegroups.com
On Oct 8, 2010, at 02:34, Albert Graef wrote:

> I've hardened the test now, it now uses the C++ compiler which should be
> able to throw out the type mismatch on the bogus timezone value, to
> actually make the compile fail on Tiger. This is in r3593.

Thanks, r3593 fixes it.

Reply all
Reply to author
Forward
0 new messages