BETA-99.0.0 segfaults when a USB companion transmits as soon as the port opens, and the Linux release fails to load on Ubuntu 24.04 and Linux Mint 22 (glibc 2.39). Fixes #600. fl_open starts SerialThread before Dart installs fl_set_callback. A Seeed Wio Tracker L1 sends bytes immediately, and the reader called that null pointer (segfault at ip 0, FlSerial+0x44b8). Vendor MeshEnvy/flserial e1864de under third_party/flserial. That is the 0.3.5 FFI API this app already calls (openPort, setCallback, setByteSize8, setDTR), not official grzesl/flserial 0.7.3. The reader waits until the callback is set, and the port mutexes are initialized before the thread starts. Merging this makes zjs81/meshcore-open the owner of that vendored copy. The release libflserial.so needed GLIBC_2.42 for cfsetispeed and cfsetospeed, so USB discovery failed on glibc 2.39 before the port opened. Bind those symbols at GLIBC_2.2.5 and pass the legacy baud values those symbols expect. 115200 is octal 0010002. glibc 2.42 turned the B* macros into plain numbers, so passing 115200 to the old symbol would select the wrong rate. flutter_onnxruntime 1.9.0 needs libonnxruntime.so.1 from ONNX Runtime 1.28.3. The zip did not ship that file, and the plugin RUNPATH was the build machine's download directory. The loader uses the plugin path for this library. The install copies libonnxruntime.so, .so.1, .so.1.28.3, and libonnxruntime_providers_shared.so into bundle/lib. The plugin build RPATH is $ORIGIN followed by the download directory: $ORIGIN is bundle/lib at runtime, and the download directory is what ld needs while linking. Dropping it makes the release link fail. The executable keeps DT_RPATH $ORIGIN/lib for its own plugins. Checked on Ubuntu 26.04.1 (glibc 2.43) with Flutter 3.47.7. Opening /dev/ttyACM0 at 115200 set both termios2 speeds to 115200 and delivered data after fl_set_callback (last length 402). The built libflserial.so has no GLIBC_2.42 requirement. flutter build linux --release succeeded. With the plugin's absolute build path removed and LD_LIBRARY_PATH unset, ldd resolved libonnxruntime.so.1 from bundle/lib.
28 lines
1.1 KiB
Ruby
28 lines
1.1 KiB
Ruby
#
|
|
# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html.
|
|
# Run `pod lib lint flserial.podspec` to validate before publishing.
|
|
#
|
|
Pod::Spec.new do |s|
|
|
s.name = 'flserial'
|
|
s.version = '0.0.1'
|
|
s.summary = 'A new Flutter FFI plugin project.'
|
|
s.description = <<-DESC
|
|
A new Flutter FFI plugin project.
|
|
DESC
|
|
s.homepage = 'http://example.com'
|
|
s.license = { :file => '../LICENSE' }
|
|
s.author = { 'Your Company' => 'email@example.com' }
|
|
|
|
# This will ensure the source files in Classes/ are included in the native
|
|
# builds of apps using this FFI plugin. Podspec does not support relative
|
|
# paths, so Classes contains a forwarder C file that relatively imports
|
|
# `../src/*` so that the C sources can be shared among all target platforms.
|
|
s.source = { :path => '.' }
|
|
s.source_files = 'Classes/**/*'
|
|
s.dependency 'FlutterMacOS'
|
|
|
|
s.platform = :osx, '10.11'
|
|
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' }
|
|
s.swift_version = '5.0'
|
|
end
|