Comments (8)
I was able to build it for iOS and visionOS easily.
- Make for Xcode without OpenSSL:
cmake -B build -G Xcode -DEVENT__DISABLE_OPENSSL=ON
- Open the resulting xcodeproj:
open build/libevent.xcodeproj
- Change Project's SDKROOT to iOS or visionOS
- Build the "event_static" scheme for "Any iOS Device" or "Any visionOS Device"
from libevent.
Hi, what's the difference between iOS and other platforms static libraries?
from libevent.
iOS and macOS for instance, have different SDK versions, which may result in differences in available APIs and features. But in general, while iOS and macOS static libraries share many similarities, differences in architecture, SDK versions, deployment targets, and app distribution requirements may need some adjustments when developing and using static libraries for each platform.
We can probably implement this for at least iOS by using:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -target arm64-apple-ios17.4 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk -fembed-bitcode-marker -c -I /path/to/headers src/file_to_compile.c -o output_dir/compiled_file.o
But, if you have a better way to do so, happy to implement it...
Thanks in advance.
from libevent.
This is the initial error we are having, before doing anything:
ld: building for 'iOS', but linking in object file (/Users/xxx/Documents/Workspace/xxx/xxx/Frameworks/libevent.a[8](event.o)) built for 'macOS'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
from libevent.
If you have maybe a CI script that we can check and help us to build for iOS, that would be great...
Thanks in advance.
from libevent.
ld: building for 'iOS', but linking in object file (/Users/xxx/Documents/Workspace/xxx/xxx/Frameworks/libevent.a8) built for 'macOS'
Looks like some issue in your cross compilation
If you have maybe a CI script that we can check and help us to build for iOS, that would be great...
We only have CI for MacOS -
libevent/.github/workflows/build.yml
Lines 527 to 619 in a942694
from libevent.
Looks like some issue in your cross compilation ----> Correct, that's exactly what is happening because we are not able to get a libevent build for iOS.
We hoped we could get that from your team, is that possible or we just need look for another options?
Sorry just trying to understand the next steps.
from libevent.
Oh, even simpler:
For iOS
cmake -B build -G Xcode -D CMAKE_OSX_SYSROOT=iphoneos
cmake --build build -t event_static
For visionOS
cmake -B build -G Xcode -D CMAKE_OSX_SYSROOT=xros
cmake --build build -t event_static
That's all. No need to disable openssl explicitly, no need to open Xcode : all is automatic and from command-line. Product will be in built in build/lib/Debug/libevent.a
.
from libevent.
Related Issues (20)
- WSOptions enum value bug
- Potential NULL pointer dereference HOT 1
- Potential Null dereference in test-dumpevents.c HOT 1
- Potential Null pointer dereference in bufferevent_openssl.c HOT 1
- Potential Null pointer dereference in regress_ws.c HOT 1
- Potential Null pointer dereference in time-test.c HOT 1
- Failure making HTTP request to unix socket HOT 2
- Coverage report is broken
- Undefined symbols for architecture after building libevent HOT 2
- MacOS CI is broken HOT 8
- event_process_active_single_queue: Use of memory after it is freed
- Unexpected input(s) 'vcpkgArguments', 'vcpkgTriplet' HOT 2
- feature request: http/3 client HOT 2
- windows socks5 combo mbedtls client: [warn] BUG: Unexpected mbedtls error code -29184: SSL - An invalid SSL record was received HOT 1
- Class member functions to be param callback of event_new HOT 1
- deadlock on event_del_nolock_() HOT 2
- Segmentation fault after bufferevent_write HOT 7
- bufferevent_write deadlock HOT 4
- buffereven_write blocking problem HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libevent.