Discussion:
[zeromq-dev] ZeroMQ 4.1.5 runtime crash on iOS 10 SDK
Ahmad Zawawi
2016-10-24 08:34:24 UTC
Permalink
Hi,

I encountered today a clock_gettime run time crash while testing on iOS 9.0
and earlier using a libzmq.a that is compiled on an iOS 10.0 SDK. The Swift
language bindings for iOS (https://github.com/azawawi/SwiftyZeroMQ) is
currently using a bundled universal libzmq.a (
https://github.com/drewcrawford/libzmq-ios). When I enabled Travis CI tests
on iOS 9 and earlier, the tests started to fail with the error "dyld: lazy
symbol binding failed: Symbol not found: _clock_gettime" (libSystem.dylib).
Tests are working perfectly on iOS 10. The problem seems to be similar to
https://curl.haxx.se/mail/lib-2016-09/0043.html.

Is there a way to disable clock_gettime detection via the configure shell
script?

Regards,
Ahmad M. Zawawi
Laughing
2016-10-25 03:26:08 UTC
Permalink
There is no clock_gettime API in the IOS platform?
Or some library should be linked?









On 10/24/2016 16:34 Ahmad Zawawi<***@gmail.com>wrote

Hi,

I encountered today a clock_gettime run time crash while testing on iOS 9.0 and earlier using a libzmq.a that is compiled on an iOS 10.0 SDK. The Swift language bindings for iOS (https://github.com/azawawi/SwiftyZeroMQ) is currently using a bundled universal libzmq.a (https://github.com/drewcrawford/libzmq-ios). When I enabled Travis CI tests on iOS 9 and earlier, the tests started to fail with the error "dyld: lazy symbol binding failed: Symbol not found: _clock_gettime" (libSystem.dylib). Tests are working perfectly on iOS 10. The problem seems to be similar to https://curl.haxx.se/mail/lib-2016-09/0043.html.

Is there a way to disable clock_gettime detection via the configure shell script?


Regards,

Ahmad M. Zawawi
Ahmad Zawawi
2016-10-25 09:12:15 UTC
Permalink
Thanks for your reply. It seems so. Please see the curl / iOS 10 discussion
in the link that I sent earlier. Meanwhile, I made a workaround to patch
src/platform.hpp after the configure stage (
https://github.com/azawawi/libzmq-ios/blob/master/platform-patched.hpp#L11).
Unit tests are now working after this change on iOS 8 and 9 simulators
(Build log: https://travis-ci.org/azawawi/SwiftyZeroMQ/jobs/170303450).

Also I saw this commit to add an implementation for it in the 4.2 branch (
https://github.com/zeromq/libzmq/commit/a8f11b3c3d719c1c248f64933862c913111dded8).
The crash was occurring in the zmq::clock_t::now_us function.

Regards,
Ahmad
Post by Laughing
There is no clock_gettime API in the IOS platform?
Or some library should be linked?
Hi,
I encountered today a clock_gettime run time crash while testing on iOS
9.0 and earlier using a libzmq.a that is compiled on an iOS 10.0 SDK. The
Swift language bindings for iOS (https://github.com/azawawi/SwiftyZeroMQ)
is currently using a bundled universal libzmq.a (https://github.com/
drewcrawford/libzmq-ios). When I enabled Travis CI tests on iOS 9 and
earlier, the tests started to fail with the error "dyld: lazy symbol
binding failed: Symbol not found: _clock_gettime" (libSystem.dylib). Tests
are working perfectly on iOS 10. The problem seems to be similar to
https://curl.haxx.se/mail/lib-2016-09/0043.html.
Is there a way to disable clock_gettime detection via the configure shell script?
Regards,
Ahmad M. Zawawi
_______________________________________________
zeromq-dev mailing list
http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Luca Boccassi
2016-10-25 14:55:29 UTC
Permalink
Hi,

I think the build system it's already doing the right thing, which is to
check if running on an apple system and if so, if the syscall is
available or not and define it if needed.

You said you built for IOS 10 and ran on IOS 9: if I understand
correctly and the syscalls support is different between those 2 version,
then that's your problem, you need to build against the right target as
they are not compatible.
Post by Ahmad Zawawi
Thanks for your reply. It seems so. Please see the curl / iOS 10 discussion
in the link that I sent earlier. Meanwhile, I made a workaround to patch
src/platform.hpp after the configure stage (
https://github.com/azawawi/libzmq-ios/blob/master/platform-patched.hpp#L11).
Unit tests are now working after this change on iOS 8 and 9 simulators
(Build log: https://travis-ci.org/azawawi/SwiftyZeroMQ/jobs/170303450).
Also I saw this commit to add an implementation for it in the 4.2 branch (
https://github.com/zeromq/libzmq/commit/a8f11b3c3d719c1c248f64933862c913111dded8).
The crash was occurring in the zmq::clock_t::now_us function.
Regards,
Ahmad
Post by Laughing
There is no clock_gettime API in the IOS platform?
Or some library should be linked?
Hi,
I encountered today a clock_gettime run time crash while testing on iOS
9.0 and earlier using a libzmq.a that is compiled on an iOS 10.0 SDK. The
Swift language bindings for iOS (https://github.com/azawawi/SwiftyZeroMQ)
is currently using a bundled universal libzmq.a (https://github.com/
drewcrawford/libzmq-ios). When I enabled Travis CI tests on iOS 9 and
earlier, the tests started to fail with the error "dyld: lazy symbol
binding failed: Symbol not found: _clock_gettime" (libSystem.dylib). Tests
are working perfectly on iOS 10. The problem seems to be similar to
https://curl.haxx.se/mail/lib-2016-09/0043.html.
Is there a way to disable clock_gettime detection via the configure shell script?
Regards,
Ahmad M. Zawawi
_______________________________________________
zeromq-dev mailing list
http://lists.zeromq.org/mailman/listinfo/zeromq-dev
_______________________________________________
zeromq-dev mailing list
http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Ahmad Zawawi
2016-10-25 15:26:04 UTC
Permalink
True. I will investigate that option. I am using the '-mios-version-min=8.0'
flag. Obviously it has some disadvantages. Please see (
https://github.com/azawawi/libzmq-ios/blob/master/libzmq.sh#L88). The
problem already occurred on a similar project (i.e.
https://curl.haxx.se/mail/lib-2016-09/0043.html).

The problem is now solved for 4.1. Any update on the release date of 4.2?

Thanks for your help,
Ahmad
Post by Luca Boccassi
Hi,
I think the build system it's already doing the right thing, which is to
check if running on an apple system and if so, if the syscall is
available or not and define it if needed.
You said you built for IOS 10 and ran on IOS 9: if I understand
correctly and the syscalls support is different between those 2 version,
then that's your problem, you need to build against the right target as
they are not compatible.
Post by Ahmad Zawawi
Thanks for your reply. It seems so. Please see the curl / iOS 10
discussion
Post by Ahmad Zawawi
in the link that I sent earlier. Meanwhile, I made a workaround to patch
src/platform.hpp after the configure stage (
https://github.com/azawawi/libzmq-ios/blob/master/
platform-patched.hpp#L11).
Post by Ahmad Zawawi
Unit tests are now working after this change on iOS 8 and 9 simulators
(Build log: https://travis-ci.org/azawawi/SwiftyZeroMQ/jobs/170303450).
Also I saw this commit to add an implementation for it in the 4.2 branch
(
Post by Ahmad Zawawi
https://github.com/zeromq/libzmq/commit/a8f11b3c3d719c1c248f64933862c9
13111dded8).
Post by Ahmad Zawawi
The crash was occurring in the zmq::clock_t::now_us function.
Regards,
Ahmad
Post by Laughing
There is no clock_gettime API in the IOS platform?
Or some library should be linked?
Hi,
I encountered today a clock_gettime run time crash while testing on iOS
9.0 and earlier using a libzmq.a that is compiled on an iOS 10.0 SDK.
The
Post by Ahmad Zawawi
Post by Laughing
Swift language bindings for iOS (https://github.com/azawawi/
SwiftyZeroMQ)
Post by Ahmad Zawawi
Post by Laughing
is currently using a bundled universal libzmq.a (https://github.com/
drewcrawford/libzmq-ios). When I enabled Travis CI tests on iOS 9 and
earlier, the tests started to fail with the error "dyld: lazy symbol
binding failed: Symbol not found: _clock_gettime" (libSystem.dylib).
Tests
Post by Ahmad Zawawi
Post by Laughing
are working perfectly on iOS 10. The problem seems to be similar to
https://curl.haxx.se/mail/lib-2016-09/0043.html.
Is there a way to disable clock_gettime detection via the configure
shell
Post by Ahmad Zawawi
Post by Laughing
script?
Regards,
Ahmad M. Zawawi
_______________________________________________
zeromq-dev mailing list
http://lists.zeromq.org/mailman/listinfo/zeromq-dev
_______________________________________________
zeromq-dev mailing list
http://lists.zeromq.org/mailman/listinfo/zeromq-dev
_______________________________________________
zeromq-dev mailing list
http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Loading...