lxi_rb 0.8.1 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +14 -0
- data/Gemfile +1 -0
- data/Gemfile.lock +11 -9
- data/Rakefile +2 -2
- data/examples/discover.rb +35 -8
- data/examples/scpi_query.rb +42 -0
- data/lib/lxi/constants.rb +20 -0
- data/lib/lxi/device.rb +6 -5
- data/lib/lxi/functions.rb +7 -20
- data/lib/lxi/methods.rb +22 -2
- data/lib/lxi/net_finder.rb +59 -0
- data/lib/lxi/version.rb +1 -1
- data/lib/lxi_rb.rb +1 -1
- data/mkmf.log +474 -0
- metadata +5 -5
- data/.rubocop.yml +0 -55
- data/examples/scpi.rb +0 -20
- data/lib/lxi/discovery.rb +0 -41
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 99383b1cdd2261dbfded47620d15cd516d51556e21ccef91511cc0ca147648dd
|
4
|
+
data.tar.gz: 2b8c3cfd54a3742c23a0f131a9a736a27e10ca3842576f7813ba75e1d968e073
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0077ab297a5436e9e3444e24bf575351069ad7ca29c9b06b84f32b24c8d1a613358f4a2c9686974133d3fdfe846d58d5003edc94bfbccd2ed577acbc87a36ada
|
7
|
+
data.tar.gz: dfc8b8ac3a3511057699192bd3ebb8123006fca60a134887bc6b0806df3ccb3badbc18d24d155add053be764e31dfaacd919d193bc55a35c440378cdaedd80c4
|
data/CHANGELOG.md
CHANGED
@@ -4,6 +4,20 @@
|
|
4
4
|
All notable changes to this project will be documented in this file.
|
5
5
|
|
6
6
|
- - -
|
7
|
+
## [v0.9.0](https://github.com/robcarruthers/lxi_rb/compare/v0.8.1..v0.9.0) - 2023-05-22
|
8
|
+
#### Features
|
9
|
+
- **(net_finder)** Add NetFinder class - ([079cef5](https://github.com/robcarruthers/lxi_rb/commit/079cef504cb37bb238b50b8fc06edf9b441ffe95)) - [@robcarruthers](https://github.com/robcarruthers)
|
10
|
+
#### Miscellaneous Tasks
|
11
|
+
- **(bundle)** Update - ([a8eeb0f](https://github.com/robcarruthers/lxi_rb/commit/a8eeb0fb80384155893159fa7e5cb13e0ec9e599)) - [@robcarruthers](https://github.com/robcarruthers)
|
12
|
+
#### Refactoring
|
13
|
+
- **(examples)** Update scpi_query.rb - ([4da333f](https://github.com/robcarruthers/lxi_rb/commit/4da333fe7dcca4dc9c05c4aec52f544a9715deb4)) - [@robcarruthers](https://github.com/robcarruthers)
|
14
|
+
- **(examples)** Update example. Add NetFinder tests - ([0ad103e](https://github.com/robcarruthers/lxi_rb/commit/0ad103e19521bf0e2863324117f16a97f18b52ad)) - [@robcarruthers](https://github.com/robcarruthers)
|
15
|
+
- **(libchecker)** Add liblxi & mdns paths to LibChecker - ([c195a24](https://github.com/robcarruthers/lxi_rb/commit/c195a245aff735439fd6be65f2624fa40310ffd7)) - [@robcarruthers](https://github.com/robcarruthers)
|
16
|
+
- **(libchecker)** Add library check - ([5ca4924](https://github.com/robcarruthers/lxi_rb/commit/5ca4924228c8a013019e431cd9f1cae99e01893d)) - [@robcarruthers](https://github.com/robcarruthers)
|
17
|
+
- **(net_finder)** Refine naming. Add liblxi & mdns library checker - ([4b16bb4](https://github.com/robcarruthers/lxi_rb/commit/4b16bb4973f439a292af22e96568cdd344e3c8a6)) - [@robcarruthers](https://github.com/robcarruthers)
|
18
|
+
|
19
|
+
- - -
|
20
|
+
|
7
21
|
## [v0.8.1](https://github.com/robcarruthers/lxi_rb/compare/v0.8.0..v0.8.1) - 2023-05-19
|
8
22
|
#### Miscellaneous Tasks
|
9
23
|
- **(bundle)** Update - ([eb95319](https://github.com/robcarruthers/lxi_rb/commit/eb95319bb48eb5f6c131f3e658ba1df6c3a0f4fb)) - [@robcarruthers](https://github.com/robcarruthers)
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -9,6 +9,7 @@ GEM
|
|
9
9
|
specs:
|
10
10
|
ansi (1.5.0)
|
11
11
|
ast (2.4.2)
|
12
|
+
awesome_print (1.9.2)
|
12
13
|
builder (3.2.4)
|
13
14
|
bump (0.10.0)
|
14
15
|
ffi (1.15.5)
|
@@ -19,39 +20,40 @@ GEM
|
|
19
20
|
builder
|
20
21
|
minitest (>= 5.0)
|
21
22
|
ruby-progressbar
|
22
|
-
parallel (1.
|
23
|
-
parser (3.2.1
|
23
|
+
parallel (1.23.0)
|
24
|
+
parser (3.2.2.1)
|
24
25
|
ast (~> 2.4.1)
|
25
26
|
rainbow (3.1.1)
|
26
27
|
rake (13.0.6)
|
27
|
-
regexp_parser (2.
|
28
|
+
regexp_parser (2.8.0)
|
28
29
|
rexml (3.2.5)
|
29
|
-
rubocop (1.
|
30
|
+
rubocop (1.51.0)
|
30
31
|
json (~> 2.3)
|
31
32
|
parallel (~> 1.10)
|
32
33
|
parser (>= 3.2.0.0)
|
33
34
|
rainbow (>= 2.2.2, < 4.0)
|
34
35
|
regexp_parser (>= 1.8, < 3.0)
|
35
36
|
rexml (>= 3.2.5, < 4.0)
|
36
|
-
rubocop-ast (>= 1.
|
37
|
+
rubocop-ast (>= 1.28.0, < 2.0)
|
37
38
|
ruby-progressbar (~> 1.7)
|
38
39
|
unicode-display_width (>= 2.4.0, < 3.0)
|
39
|
-
rubocop-ast (1.
|
40
|
+
rubocop-ast (1.28.1)
|
40
41
|
parser (>= 3.2.1.0)
|
41
42
|
rubocop-minitest (0.31.0)
|
42
43
|
rubocop (>= 1.39, < 2.0)
|
43
|
-
rubocop-performance (1.
|
44
|
+
rubocop-performance (1.18.0)
|
44
45
|
rubocop (>= 1.7.0, < 2.0)
|
45
46
|
rubocop-ast (>= 0.4.0)
|
46
47
|
rubocop-rake (0.6.0)
|
47
48
|
rubocop (~> 1.0)
|
48
|
-
ruby-progressbar (1.
|
49
|
+
ruby-progressbar (1.13.0)
|
49
50
|
unicode-display_width (2.4.2)
|
50
51
|
|
51
52
|
PLATFORMS
|
52
53
|
arm64-darwin-22
|
53
54
|
|
54
55
|
DEPENDENCIES
|
56
|
+
awesome_print (~> 1.8)
|
55
57
|
bump (~> 0.10.0)
|
56
58
|
lxi_rb!
|
57
59
|
minitest (~> 5.18)
|
@@ -63,4 +65,4 @@ DEPENDENCIES
|
|
63
65
|
rubocop-rake (~> 0.4)
|
64
66
|
|
65
67
|
BUNDLED WITH
|
66
|
-
2.4.
|
68
|
+
2.4.13
|
data/Rakefile
CHANGED
@@ -5,9 +5,9 @@ require 'rake/testtask'
|
|
5
5
|
Dir.glob('tasks/*.rake').each { |r| import r }
|
6
6
|
|
7
7
|
Rake::TestTask.new(:test) do |t|
|
8
|
-
t.libs << %w[test
|
8
|
+
t.libs << %w[test]
|
9
9
|
t.libs << 'lib'
|
10
|
-
t.test_files = FileList['test/**/test_*.rb', '
|
10
|
+
t.test_files = FileList['test/**/test_*.rb', 'test/**/*_spec.rb']
|
11
11
|
end
|
12
12
|
|
13
13
|
require 'rubocop/rake_task'
|
data/examples/discover.rb
CHANGED
@@ -1,7 +1,29 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Example: Discover LXI devices on the LAN
|
4
|
+
# Usage: ruby discover.rb [options]
|
5
|
+
# Usage: ruby discover.rb --timeout_ms 1000 --search_type :vxi11
|
6
|
+
# -t, --timeout_ms TIMEOUT Timeout in milliseconds
|
7
|
+
# -s, --search_type type Search Type, vxi11 or mdns
|
8
|
+
|
2
9
|
require 'ffi'
|
10
|
+
require 'optparse'
|
3
11
|
require_relative '../lib/lxi_rb'
|
4
12
|
|
13
|
+
options = {}
|
14
|
+
op =
|
15
|
+
OptionParser.new do |opts|
|
16
|
+
opts.banner = 'Usage: discover.rb [options]'
|
17
|
+
|
18
|
+
opts.on('-t', '--timeout_ms TIMEOUT', 'Timeout in milliseconds') do |timeout|
|
19
|
+
options[:timeout_ms] = Integer(timeout, 10)
|
20
|
+
end
|
21
|
+
opts.on('-s', '--search_type type', "Search Type, 'vxi11' or 'mdns'") do |param|
|
22
|
+
options[:search_type] = param.is_a?(Symbol) ? param : param.to_sym
|
23
|
+
end
|
24
|
+
end
|
25
|
+
op.parse!
|
26
|
+
|
5
27
|
# Discovery Callbacks
|
6
28
|
BroadcastCallback =
|
7
29
|
FFI::Function.new(:void, %i[pointer pointer]) do |address, interface|
|
@@ -10,25 +32,30 @@ BroadcastCallback =
|
|
10
32
|
|
11
33
|
DeviceCallback =
|
12
34
|
FFI::Function.new(:void, %i[pointer pointer]) do |address, id|
|
13
|
-
puts("
|
35
|
+
puts(" Found #{id.read_string} on address #{address.read_string}")
|
14
36
|
end
|
15
37
|
|
16
38
|
ServiceCallback =
|
17
39
|
FFI::Function.new(:void, %i[pointer pointer pointer int]) do |address, id, service, port|
|
18
|
-
puts("
|
40
|
+
puts(" Found: #{id.read_string} on address #{address.read_string},")
|
41
|
+
puts(" Service type: #{service.read_string}, on port: #{port}")
|
19
42
|
end
|
20
43
|
|
21
44
|
# Discover LXI-11 devices on the LAN
|
22
|
-
timeout_ms = 1000
|
45
|
+
timeout_ms = options[:timeout_ms] || 1000
|
23
46
|
# Search types, Bonjour :mdns or VXI-11 :vxi11 (default)
|
24
|
-
search_type = :vxi11
|
47
|
+
search_type = options[:search_type] || :vxi11
|
48
|
+
|
49
|
+
# Initialize LXI session
|
50
|
+
Lxi.init_session
|
25
51
|
|
26
|
-
|
52
|
+
# Setup discovery callbacks
|
27
53
|
info = Lxi::FFIFunctions::LxiInfo.new
|
28
54
|
info[:broadcast] = BroadcastCallback
|
29
55
|
info[:device] = DeviceCallback
|
56
|
+
info[:service] = ServiceCallback
|
30
57
|
|
31
|
-
|
32
|
-
|
33
|
-
result = Lxi.
|
58
|
+
# Start discovery
|
59
|
+
puts("\nSearching for LXI devices \n Search type: #{search_type} - please wait...\n\n")
|
60
|
+
result = Lxi.discover(info, timeout_ms, search_type)
|
34
61
|
puts("Error during discovery: #{result}") if result.negative?
|
@@ -0,0 +1,42 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
require 'optparse'
|
3
|
+
require_relative '../lib/lxi_rb'
|
4
|
+
|
5
|
+
# Example: SCPI Query LXI devices on the LAN
|
6
|
+
# Usage: ruby scpi_query.rb --address 192.168.10.109 --command *IDN?
|
7
|
+
# -a, --address IP_ADDRESS Device IP address
|
8
|
+
# -c, --command COMMAND Device command
|
9
|
+
|
10
|
+
options = {}
|
11
|
+
op =
|
12
|
+
OptionParser.new do |opts|
|
13
|
+
opts.banner = 'Usage: query_device.rb [options]'
|
14
|
+
|
15
|
+
opts.on('-a', '--address IP_ADDRESS', 'Device IP address (*required)') { |ip| options[:address] = ip }
|
16
|
+
opts.on('-c', '--command COMMAND', "Device command (default = '*IDN?')") { |cmd| options[:command] = cmd }
|
17
|
+
opts.on('-R', '--read_bytes BYTES', 'Bytes to read back from Device (default = 512') do |bytes|
|
18
|
+
options[:bytes] = bytes
|
19
|
+
end
|
20
|
+
end
|
21
|
+
op.parse!
|
22
|
+
|
23
|
+
# Check for address
|
24
|
+
unless options[:address]
|
25
|
+
puts op
|
26
|
+
exit
|
27
|
+
end
|
28
|
+
|
29
|
+
# Initialize LXI library
|
30
|
+
Lxi.init_session
|
31
|
+
|
32
|
+
# Create a new LXI device
|
33
|
+
address = options[:address] || ''
|
34
|
+
device_type = :vxi11
|
35
|
+
command = options[:command] || '*IDN?'
|
36
|
+
bytes = options[:bytes] || 512
|
37
|
+
|
38
|
+
Lxi::Device.new(address, device_type) do |device|
|
39
|
+
device.write(command)
|
40
|
+
sleep 0.05
|
41
|
+
puts device.read bytes
|
42
|
+
end
|
data/lib/lxi/constants.rb
CHANGED
@@ -3,4 +3,24 @@ module Lxi
|
|
3
3
|
# LXI Constants
|
4
4
|
LXI_OK = 0
|
5
5
|
LXI_ERROR = -1
|
6
|
+
|
7
|
+
LIBLXI_PATHS = %w[
|
8
|
+
liblxi
|
9
|
+
liblxi.so.1
|
10
|
+
/home/linuxbrew/.linuxbrew/lib/liblxi.so.1
|
11
|
+
/usr/local/lib/liblxi.dylib
|
12
|
+
/usr/local/lib/liblxi.so
|
13
|
+
/usr/lib/liblxi.dylib
|
14
|
+
/usr/lib/liblxi.so
|
15
|
+
].freeze
|
16
|
+
|
17
|
+
MDNS_PATHS = %w[
|
18
|
+
mdns
|
19
|
+
avahi-client
|
20
|
+
libavahi-client
|
21
|
+
avahi-client.so.1
|
22
|
+
/home/linuxbrew/.linuxbrew/lib/avahi-client.so.1
|
23
|
+
/usr/local/lib/libavahi-client.so
|
24
|
+
/usr/lib/libavahi-client.so
|
25
|
+
].freeze
|
6
26
|
end
|
data/lib/lxi/device.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
+
|
2
3
|
module Lxi
|
3
4
|
class Device
|
4
5
|
include FFI
|
@@ -19,9 +20,9 @@ module Lxi
|
|
19
20
|
end
|
20
21
|
|
21
22
|
def connect
|
22
|
-
Lxi.
|
23
|
+
Lxi.init_session
|
23
24
|
|
24
|
-
@id = Lxi.
|
25
|
+
@id = Lxi.connect(@address, @port, @name, @timeout, @protocol)
|
25
26
|
raise(Error, 'LXI Connection Error') if @id == LXI_ERROR
|
26
27
|
|
27
28
|
true
|
@@ -29,12 +30,12 @@ module Lxi
|
|
29
30
|
alias open connect
|
30
31
|
|
31
32
|
def disconnect
|
32
|
-
Lxi.
|
33
|
+
Lxi.disconnect(@id)
|
33
34
|
end
|
34
35
|
alias close disconnect
|
35
36
|
|
36
37
|
def write(message)
|
37
|
-
bytes_sent = Lxi.
|
38
|
+
bytes_sent = Lxi.__send(@id, message, message.length, @timeout)
|
38
39
|
raise(Error, 'LXI communications error') unless bytes_sent.positive?
|
39
40
|
|
40
41
|
bytes_sent
|
@@ -44,7 +45,7 @@ module Lxi
|
|
44
45
|
|
45
46
|
def read(length)
|
46
47
|
message = FFI::MemoryPointer.new(:char, length)
|
47
|
-
bytes_received = Lxi.
|
48
|
+
bytes_received = Lxi.receive(@id, message, length, @timeout)
|
48
49
|
raise(Error, 'LXI communications error') unless bytes_received.positive?
|
49
50
|
|
50
51
|
message.read_string
|
data/lib/lxi/functions.rb
CHANGED
@@ -18,30 +18,17 @@ module Lxi
|
|
18
18
|
callback(%i[pointer pointer pointer int], :void)
|
19
19
|
end
|
20
20
|
|
21
|
-
class LxiBrowseInfo < FFI::Struct
|
22
|
-
layout :broadcast,
|
23
|
-
callback(%i[pointer pointer], :void),
|
24
|
-
:device,
|
25
|
-
callback(%i[pointer pointer], :void),
|
26
|
-
:service,
|
27
|
-
callback(%i[pointer pointer pointer int], :void),
|
28
|
-
:servicename,
|
29
|
-
:string,
|
30
|
-
:regtype,
|
31
|
-
:string
|
32
|
-
end
|
33
|
-
|
34
21
|
# Define liblxi enums
|
35
22
|
enum :lxi_protocol_type, %i[vxi11 raw hyslip]
|
36
23
|
enum :lxi_discover_type, %i[vxi11 mdns]
|
37
24
|
|
38
25
|
# Expose liblxi functions
|
39
|
-
attach_function :lxi_init, [], :int
|
40
|
-
attach_function :
|
41
|
-
attach_function :lxi_discover_if, [LxiInfo.ptr, :string, :int, :lxi_discover_type], :int
|
42
|
-
attach_function :lxi_connect, %i[string int string int lxi_protocol_type], :int
|
43
|
-
attach_function :lxi_send, %i[int string int int], :int
|
44
|
-
attach_function :lxi_receive, %i[int pointer int int], :int
|
45
|
-
attach_function :lxi_disconnect, [:int], :int
|
26
|
+
attach_function :init, :lxi_init, [], :int
|
27
|
+
attach_function :discover, :lxi_discover, [LxiInfo.ptr, :int, :lxi_discover_type], :int
|
28
|
+
attach_function :discover_if, :lxi_discover_if, [LxiInfo.ptr, :string, :int, :lxi_discover_type], :int
|
29
|
+
attach_function :connect, :lxi_connect, %i[string int string int lxi_protocol_type], :int
|
30
|
+
attach_function :__send, :lxi_send, %i[int string int int], :int
|
31
|
+
attach_function :receive, :lxi_receive, %i[int pointer int int], :int
|
32
|
+
attach_function :disconnect, :lxi_disconnect, [:int], :int
|
46
33
|
end
|
47
34
|
end
|
data/lib/lxi/methods.rb
CHANGED
@@ -1,7 +1,27 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
+
|
2
3
|
module Lxi
|
3
4
|
# Initialise the LXI library
|
4
|
-
def self.
|
5
|
-
raise(Error, 'LXI Library
|
5
|
+
def self.init_session
|
6
|
+
raise(Error, 'LXI Library not found') unless LibChecker.installed?(LIBLXI_PATHS)
|
7
|
+
raise(Error, 'LXI Library Initialisation Error') unless Lxi.init == LXI_OK
|
8
|
+
|
9
|
+
true
|
10
|
+
end
|
11
|
+
|
12
|
+
module LibChecker
|
13
|
+
extend FFI::Library
|
14
|
+
|
15
|
+
def self.installed?(lib_paths = [])
|
16
|
+
lib_paths.each do |path|
|
17
|
+
begin
|
18
|
+
ffi_lib path
|
19
|
+
return true
|
20
|
+
rescue LoadError
|
21
|
+
next
|
22
|
+
end
|
23
|
+
end
|
24
|
+
false
|
25
|
+
end
|
6
26
|
end
|
7
27
|
end
|
@@ -0,0 +1,59 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Lxi
|
4
|
+
class NetFinder
|
5
|
+
include FFI
|
6
|
+
|
7
|
+
def init
|
8
|
+
@devices = []
|
9
|
+
Lxi.init_session
|
10
|
+
end
|
11
|
+
|
12
|
+
def search(timeout: 1000, type: :vxi11)
|
13
|
+
if type == :mdns
|
14
|
+
raise Error, 'mDNS library not found' unless check_mdns_lib?
|
15
|
+
end
|
16
|
+
|
17
|
+
@devices = []
|
18
|
+
info = FFIFunctions::LxiInfo.new
|
19
|
+
info[:broadcast] = broadcast_callback
|
20
|
+
info[:device] = device_callback
|
21
|
+
info[:service] = service_callback
|
22
|
+
|
23
|
+
result = Lxi.discover(info, timeout, type)
|
24
|
+
raise(Error, "Discovery error: #{result}") unless result == LXI_OK
|
25
|
+
|
26
|
+
sleep(0.25)
|
27
|
+
@devices
|
28
|
+
end
|
29
|
+
|
30
|
+
private
|
31
|
+
|
32
|
+
def check_mdns_lib?
|
33
|
+
Lxi::LibChecker.installed?(Lxi::MDNS_PATHS)
|
34
|
+
end
|
35
|
+
|
36
|
+
def broadcast_callback
|
37
|
+
# FFI::Function.new(:void, %i[pointer pointer]) do |service, interface|
|
38
|
+
# puts("Broadcast: #{service.read_string} on #{interface.read_string}\n\n")
|
39
|
+
# @devices << { service: service.read_string, interface: interface.read_string }
|
40
|
+
# end
|
41
|
+
end
|
42
|
+
|
43
|
+
def device_callback
|
44
|
+
FFI::Function.new(:void, %i[pointer pointer]) do |address, id|
|
45
|
+
# puts("Device: #{id.read_string} at #{address.read_string}")
|
46
|
+
@devices << { address: address.read_string, id: id.read_string }
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
def service_callback
|
51
|
+
FFI::Function.new(:void, %i[pointer pointer pointer int]) do |address, id, service, port|
|
52
|
+
address = address.read_string
|
53
|
+
id = id.read_string
|
54
|
+
service = service.read_string
|
55
|
+
@devices << { address:, id:, service:, port: }
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
data/lib/lxi/version.rb
CHANGED
data/lib/lxi_rb.rb
CHANGED
@@ -3,9 +3,9 @@
|
|
3
3
|
require_relative 'lxi/callbacks'
|
4
4
|
require_relative 'lxi/constants'
|
5
5
|
require_relative 'lxi/device'
|
6
|
-
require_relative 'lxi/discovery'
|
7
6
|
require_relative 'lxi/functions'
|
8
7
|
require_relative 'lxi/methods'
|
8
|
+
require_relative 'lxi/net_finder'
|
9
9
|
require_relative 'lxi/version'
|
10
10
|
|
11
11
|
module Lxi
|
data/mkmf.log
ADDED
@@ -0,0 +1,474 @@
|
|
1
|
+
have_framework: checking for liblxi... -------------------- no
|
2
|
+
|
3
|
+
DYLD_FALLBACK_LIBRARY_PATH=.:/Users/rob/.asdf/installs/ruby/3.1.3/lib "clang -o conftest -I/Users/rob/.asdf/installs/ruby/3.1.3/include/ruby-3.1.0/arm64-darwin22 -I/Users/rob/.asdf/installs/ruby/3.1.3/include/ruby-3.1.0/ruby/backward -I/Users/rob/.asdf/installs/ruby/3.1.3/include/ruby-3.1.0 -I/Users/rob/Code/ruby/lxi_rb/bin -I/Users/rob/.asdf/installs/ruby/3.1.3/include -I/opt/homebrew/opt/gmp/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -fdeclspec -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdivision-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wextra-tokens -Wundef -fno-common -pipe conftest.c -L. -L/Users/rob/.asdf/installs/ruby/3.1.3/lib -L. -L/Users/rob/.asdf/installs/ruby/3.1.3/lib -fstack-protector-strong -L/opt/homebrew/opt/gmp/lib -L/usr/local/lib -lruby.3.1 "
|
4
|
+
checked program was:
|
5
|
+
/* begin */
|
6
|
+
1: #include "ruby.h"
|
7
|
+
2:
|
8
|
+
3: int main(int argc, char **argv)
|
9
|
+
4: {
|
10
|
+
5: return !!argv[argc];
|
11
|
+
6: }
|
12
|
+
/* end */
|
13
|
+
|
14
|
+
DYLD_FALLBACK_LIBRARY_PATH=.:/Users/rob/.asdf/installs/ruby/3.1.3/lib "clang -o conftest -I/Users/rob/.asdf/installs/ruby/3.1.3/include/ruby-3.1.0/arm64-darwin22 -I/Users/rob/.asdf/installs/ruby/3.1.3/include/ruby-3.1.0/ruby/backward -I/Users/rob/.asdf/installs/ruby/3.1.3/include/ruby-3.1.0 -I/Users/rob/Code/ruby/lxi_rb/bin -I/Users/rob/.asdf/installs/ruby/3.1.3/include -I/opt/homebrew/opt/gmp/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -fdeclspec -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdivision-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wextra-tokens -Wundef -fno-common -pipe conftest.c -L. -L/Users/rob/.asdf/installs/ruby/3.1.3/lib -L. -L/Users/rob/.asdf/installs/ruby/3.1.3/lib -fstack-protector-strong -L/opt/homebrew/opt/gmp/lib -L/usr/local/lib -lruby.3.1 -framework liblxi "
|
15
|
+
conftest.c:3:10: fatal error: 'liblxi/liblxi.h' file not found
|
16
|
+
#include <liblxi/liblxi.h>
|
17
|
+
^~~~~~~~~~~~~~~~~
|
18
|
+
1 error generated.
|
19
|
+
checked program was:
|
20
|
+
/* begin */
|
21
|
+
1: #include "ruby.h"
|
22
|
+
2:
|
23
|
+
3: #include <liblxi/liblxi.h>
|
24
|
+
4:
|
25
|
+
5: int main(void){return 0;}
|
26
|
+
/* end */
|
27
|
+
|
28
|
+
DYLD_FALLBACK_LIBRARY_PATH=.:/Users/rob/.asdf/installs/ruby/3.1.3/lib "clang -o conftest -I/Users/rob/.asdf/installs/ruby/3.1.3/include/ruby-3.1.0/arm64-darwin22 -I/Users/rob/.asdf/installs/ruby/3.1.3/include/ruby-3.1.0/ruby/backward -I/Users/rob/.asdf/installs/ruby/3.1.3/include/ruby-3.1.0 -I/Users/rob/Code/ruby/lxi_rb/bin -I/Users/rob/.asdf/installs/ruby/3.1.3/include -I/opt/homebrew/opt/gmp/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -fdeclspec -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdivision-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wextra-tokens -Wundef -fno-common -pipe conftest.c -L. -L/Users/rob/.asdf/installs/ruby/3.1.3/lib -L. -L/Users/rob/.asdf/installs/ruby/3.1.3/lib -fstack-protector-strong -L/opt/homebrew/opt/gmp/lib -L/usr/local/lib -lruby.3.1 -ObjC -framework liblxi "
|
29
|
+
conftest.c:3:10: fatal error: 'liblxi/liblxi.h' file not found
|
30
|
+
#include <liblxi/liblxi.h>
|
31
|
+
^~~~~~~~~~~~~~~~~
|
32
|
+
1 error generated.
|
33
|
+
checked program was:
|
34
|
+
/* begin */
|
35
|
+
1: #include "ruby.h"
|
36
|
+
2:
|
37
|
+
3: #include <liblxi/liblxi.h>
|
38
|
+
4:
|
39
|
+
5: int main(void){return 0;}
|
40
|
+
/* end */
|
41
|
+
|
42
|
+
--------------------
|
43
|
+
|
44
|
+
have_framework: checking for lxi... -------------------- no
|
45
|
+
|
46
|
+
DYLD_FALLBACK_LIBRARY_PATH=.:/Users/rob/.asdf/installs/ruby/3.1.3/lib "clang -o conftest -I/Users/rob/.asdf/installs/ruby/3.1.3/include/ruby-3.1.0/arm64-darwin22 -I/Users/rob/.asdf/installs/ruby/3.1.3/include/ruby-3.1.0/ruby/backward -I/Users/rob/.asdf/installs/ruby/3.1.3/include/ruby-3.1.0 -I/Users/rob/Code/ruby/lxi_rb/bin -I/Users/rob/.asdf/installs/ruby/3.1.3/include -I/opt/homebrew/opt/gmp/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -fdeclspec -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdivision-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wextra-tokens -Wundef -fno-common -pipe conftest.c -L. -L/Users/rob/.asdf/installs/ruby/3.1.3/lib -L. -L/Users/rob/.asdf/installs/ruby/3.1.3/lib -fstack-protector-strong -L/opt/homebrew/opt/gmp/lib -L/usr/local/lib -lruby.3.1 -framework lxi "
|
47
|
+
conftest.c:3:10: fatal error: 'lxi/lxi.h' file not found
|
48
|
+
#include <lxi/lxi.h>
|
49
|
+
^~~~~~~~~~~
|
50
|
+
1 error generated.
|
51
|
+
checked program was:
|
52
|
+
/* begin */
|
53
|
+
1: #include "ruby.h"
|
54
|
+
2:
|
55
|
+
3: #include <lxi/lxi.h>
|
56
|
+
4:
|
57
|
+
5: int main(void){return 0;}
|
58
|
+
/* end */
|
59
|
+
|
60
|
+
DYLD_FALLBACK_LIBRARY_PATH=.:/Users/rob/.asdf/installs/ruby/3.1.3/lib "clang -o conftest -I/Users/rob/.asdf/installs/ruby/3.1.3/include/ruby-3.1.0/arm64-darwin22 -I/Users/rob/.asdf/installs/ruby/3.1.3/include/ruby-3.1.0/ruby/backward -I/Users/rob/.asdf/installs/ruby/3.1.3/include/ruby-3.1.0 -I/Users/rob/Code/ruby/lxi_rb/bin -I/Users/rob/.asdf/installs/ruby/3.1.3/include -I/opt/homebrew/opt/gmp/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -fdeclspec -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdivision-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wextra-tokens -Wundef -fno-common -pipe conftest.c -L. -L/Users/rob/.asdf/installs/ruby/3.1.3/lib -L. -L/Users/rob/.asdf/installs/ruby/3.1.3/lib -fstack-protector-strong -L/opt/homebrew/opt/gmp/lib -L/usr/local/lib -lruby.3.1 -ObjC -framework lxi "
|
61
|
+
conftest.c:3:10: fatal error: 'lxi/lxi.h' file not found
|
62
|
+
#include <lxi/lxi.h>
|
63
|
+
^~~~~~~~~~~
|
64
|
+
1 error generated.
|
65
|
+
checked program was:
|
66
|
+
/* begin */
|
67
|
+
1: #include "ruby.h"
|
68
|
+
2:
|
69
|
+
3: #include <lxi/lxi.h>
|
70
|
+
4:
|
71
|
+
5: int main(void){return 0;}
|
72
|
+
/* end */
|
73
|
+
|
74
|
+
--------------------
|
75
|
+
|
76
|
+
have_framework: checking for liblxi... -------------------- no
|
77
|
+
|
78
|
+
DYLD_FALLBACK_LIBRARY_PATH=.:/Users/rob/.asdf/installs/ruby/3.1.3/lib "clang -o conftest -I/Users/rob/.asdf/installs/ruby/3.1.3/include/ruby-3.1.0/arm64-darwin22 -I/Users/rob/.asdf/installs/ruby/3.1.3/include/ruby-3.1.0/ruby/backward -I/Users/rob/.asdf/installs/ruby/3.1.3/include/ruby-3.1.0 -I/Users/rob/Code/ruby/lxi_rb/bin -I/Users/rob/.asdf/installs/ruby/3.1.3/include -I/opt/homebrew/opt/gmp/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -fdeclspec -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdivision-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wextra-tokens -Wundef -fno-common -pipe conftest.c -L. -L/Users/rob/.asdf/installs/ruby/3.1.3/lib -L. -L/Users/rob/.asdf/installs/ruby/3.1.3/lib -fstack-protector-strong -L/opt/homebrew/opt/gmp/lib -L/usr/local/lib -lruby.3.1 -framework liblxi "
|
79
|
+
conftest.c:3:10: fatal error: 'liblxi/liblxi.h' file not found
|
80
|
+
#include <liblxi/liblxi.h>
|
81
|
+
^~~~~~~~~~~~~~~~~
|
82
|
+
1 error generated.
|
83
|
+
checked program was:
|
84
|
+
/* begin */
|
85
|
+
1: #include "ruby.h"
|
86
|
+
2:
|
87
|
+
3: #include <liblxi/liblxi.h>
|
88
|
+
4:
|
89
|
+
5: int main(void){return 0;}
|
90
|
+
/* end */
|
91
|
+
|
92
|
+
DYLD_FALLBACK_LIBRARY_PATH=.:/Users/rob/.asdf/installs/ruby/3.1.3/lib "clang -o conftest -I/Users/rob/.asdf/installs/ruby/3.1.3/include/ruby-3.1.0/arm64-darwin22 -I/Users/rob/.asdf/installs/ruby/3.1.3/include/ruby-3.1.0/ruby/backward -I/Users/rob/.asdf/installs/ruby/3.1.3/include/ruby-3.1.0 -I/Users/rob/Code/ruby/lxi_rb/bin -I/Users/rob/.asdf/installs/ruby/3.1.3/include -I/opt/homebrew/opt/gmp/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -fdeclspec -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdivision-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wextra-tokens -Wundef -fno-common -pipe conftest.c -L. -L/Users/rob/.asdf/installs/ruby/3.1.3/lib -L. -L/Users/rob/.asdf/installs/ruby/3.1.3/lib -fstack-protector-strong -L/opt/homebrew/opt/gmp/lib -L/usr/local/lib -lruby.3.1 -ObjC -framework liblxi "
|
93
|
+
conftest.c:3:10: fatal error: 'liblxi/liblxi.h' file not found
|
94
|
+
#include <liblxi/liblxi.h>
|
95
|
+
^~~~~~~~~~~~~~~~~
|
96
|
+
1 error generated.
|
97
|
+
checked program was:
|
98
|
+
/* begin */
|
99
|
+
1: #include "ruby.h"
|
100
|
+
2:
|
101
|
+
3: #include <liblxi/liblxi.h>
|
102
|
+
4:
|
103
|
+
5: int main(void){return 0;}
|
104
|
+
/* end */
|
105
|
+
|
106
|
+
--------------------
|
107
|
+
|
108
|
+
have_library: checking for -lliblxi... -------------------- no
|
109
|
+
|
110
|
+
DYLD_FALLBACK_LIBRARY_PATH=.:/Users/rob/.asdf/installs/ruby/3.1.3/lib "clang -o conftest -I/Users/rob/.asdf/installs/ruby/3.1.3/include/ruby-3.1.0/arm64-darwin22 -I/Users/rob/.asdf/installs/ruby/3.1.3/include/ruby-3.1.0/ruby/backward -I/Users/rob/.asdf/installs/ruby/3.1.3/include/ruby-3.1.0 -I/Users/rob/Code/ruby/lxi_rb/bin -I/Users/rob/.asdf/installs/ruby/3.1.3/include -I/opt/homebrew/opt/gmp/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -fdeclspec -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdivision-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wextra-tokens -Wundef -fno-common -pipe conftest.c -L. -L/Users/rob/.asdf/installs/ruby/3.1.3/lib -L. -L/Users/rob/.asdf/installs/ruby/3.1.3/lib -fstack-protector-strong -L/opt/homebrew/opt/gmp/lib -L/usr/local/lib -lruby.3.1 -lliblxi "
|
111
|
+
ld: library not found for -lliblxi
|
112
|
+
clang: error: linker command failed with exit code 1 (use -v to see invocation)
|
113
|
+
checked program was:
|
114
|
+
/* begin */
|
115
|
+
1: #include "ruby.h"
|
116
|
+
2:
|
117
|
+
3: /*top*/
|
118
|
+
4: extern int t(void);
|
119
|
+
5: int main(int argc, char **argv)
|
120
|
+
6: {
|
121
|
+
7: if (argc > 1000000) {
|
122
|
+
8: int (* volatile tp)(void)=(int (*)(void))&t;
|
123
|
+
9: printf("%d", (*tp)());
|
124
|
+
10: }
|
125
|
+
11:
|
126
|
+
12: return !!argv[argc];
|
127
|
+
13: }
|
128
|
+
14:
|
129
|
+
15: int t(void) { ; return 0; }
|
130
|
+
/* end */
|
131
|
+
|
132
|
+
--------------------
|
133
|
+
|
134
|
+
have_library: checking for -llxi... -------------------- no
|
135
|
+
|
136
|
+
DYLD_FALLBACK_LIBRARY_PATH=.:/Users/rob/.asdf/installs/ruby/3.1.3/lib "clang -o conftest -I/Users/rob/.asdf/installs/ruby/3.1.3/include/ruby-3.1.0/arm64-darwin22 -I/Users/rob/.asdf/installs/ruby/3.1.3/include/ruby-3.1.0/ruby/backward -I/Users/rob/.asdf/installs/ruby/3.1.3/include/ruby-3.1.0 -I/Users/rob/Code/ruby/lxi_rb/bin -I/Users/rob/.asdf/installs/ruby/3.1.3/include -I/opt/homebrew/opt/gmp/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -fdeclspec -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdivision-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wextra-tokens -Wundef -fno-common -pipe conftest.c -L. -L/Users/rob/.asdf/installs/ruby/3.1.3/lib -L. -L/Users/rob/.asdf/installs/ruby/3.1.3/lib -fstack-protector-strong -L/opt/homebrew/opt/gmp/lib -L/usr/local/lib -lruby.3.1 -llxi "
|
137
|
+
ld: library not found for -llxi
|
138
|
+
clang: error: linker command failed with exit code 1 (use -v to see invocation)
|
139
|
+
checked program was:
|
140
|
+
/* begin */
|
141
|
+
1: #include "ruby.h"
|
142
|
+
2:
|
143
|
+
3: /*top*/
|
144
|
+
4: extern int t(void);
|
145
|
+
5: int main(int argc, char **argv)
|
146
|
+
6: {
|
147
|
+
7: if (argc > 1000000) {
|
148
|
+
8: int (* volatile tp)(void)=(int (*)(void))&t;
|
149
|
+
9: printf("%d", (*tp)());
|
150
|
+
10: }
|
151
|
+
11:
|
152
|
+
12: return !!argv[argc];
|
153
|
+
13: }
|
154
|
+
14:
|
155
|
+
15: int t(void) { ; return 0; }
|
156
|
+
/* end */
|
157
|
+
|
158
|
+
--------------------
|
159
|
+
|
160
|
+
have_library: checking for lxi_init() in -llxi... -------------------- no
|
161
|
+
|
162
|
+
DYLD_FALLBACK_LIBRARY_PATH=.:/Users/rob/.asdf/installs/ruby/3.1.3/lib "clang -o conftest -I/Users/rob/.asdf/installs/ruby/3.1.3/include/ruby-3.1.0/arm64-darwin22 -I/Users/rob/.asdf/installs/ruby/3.1.3/include/ruby-3.1.0/ruby/backward -I/Users/rob/.asdf/installs/ruby/3.1.3/include/ruby-3.1.0 -I/Users/rob/Code/ruby/lxi_rb/bin -I/Users/rob/.asdf/installs/ruby/3.1.3/include -I/opt/homebrew/opt/gmp/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -fdeclspec -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdivision-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wextra-tokens -Wundef -fno-common -pipe conftest.c -L. -L/Users/rob/.asdf/installs/ruby/3.1.3/lib -L. -L/Users/rob/.asdf/installs/ruby/3.1.3/lib -fstack-protector-strong -L/opt/homebrew/opt/gmp/lib -L/usr/local/lib -lruby.3.1 -llxi "
|
163
|
+
conftest.c:14:57: error: use of undeclared identifier 'lxi_init'
|
164
|
+
int t(void) { void ((*volatile p)()); p = (void ((*)()))lxi_init; return !p; }
|
165
|
+
^
|
166
|
+
1 error generated.
|
167
|
+
checked program was:
|
168
|
+
/* begin */
|
169
|
+
1: #include "ruby.h"
|
170
|
+
2:
|
171
|
+
3: /*top*/
|
172
|
+
4: extern int t(void);
|
173
|
+
5: int main(int argc, char **argv)
|
174
|
+
6: {
|
175
|
+
7: if (argc > 1000000) {
|
176
|
+
8: int (* volatile tp)(void)=(int (*)(void))&t;
|
177
|
+
9: printf("%d", (*tp)());
|
178
|
+
10: }
|
179
|
+
11:
|
180
|
+
12: return !!argv[argc];
|
181
|
+
13: }
|
182
|
+
14: int t(void) { void ((*volatile p)()); p = (void ((*)()))lxi_init; return !p; }
|
183
|
+
/* end */
|
184
|
+
|
185
|
+
DYLD_FALLBACK_LIBRARY_PATH=.:/Users/rob/.asdf/installs/ruby/3.1.3/lib "clang -o conftest -I/Users/rob/.asdf/installs/ruby/3.1.3/include/ruby-3.1.0/arm64-darwin22 -I/Users/rob/.asdf/installs/ruby/3.1.3/include/ruby-3.1.0/ruby/backward -I/Users/rob/.asdf/installs/ruby/3.1.3/include/ruby-3.1.0 -I/Users/rob/Code/ruby/lxi_rb/bin -I/Users/rob/.asdf/installs/ruby/3.1.3/include -I/opt/homebrew/opt/gmp/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -fdeclspec -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdivision-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wextra-tokens -Wundef -fno-common -pipe conftest.c -L. -L/Users/rob/.asdf/installs/ruby/3.1.3/lib -L. -L/Users/rob/.asdf/installs/ruby/3.1.3/lib -fstack-protector-strong -L/opt/homebrew/opt/gmp/lib -L/usr/local/lib -lruby.3.1 -llxi "
|
186
|
+
ld: library not found for -llxi
|
187
|
+
clang: error: linker command failed with exit code 1 (use -v to see invocation)
|
188
|
+
checked program was:
|
189
|
+
/* begin */
|
190
|
+
1: #include "ruby.h"
|
191
|
+
2:
|
192
|
+
3: /*top*/
|
193
|
+
4: extern int t(void);
|
194
|
+
5: int main(int argc, char **argv)
|
195
|
+
6: {
|
196
|
+
7: if (argc > 1000000) {
|
197
|
+
8: int (* volatile tp)(void)=(int (*)(void))&t;
|
198
|
+
9: printf("%d", (*tp)());
|
199
|
+
10: }
|
200
|
+
11:
|
201
|
+
12: return !!argv[argc];
|
202
|
+
13: }
|
203
|
+
14: extern void lxi_init();
|
204
|
+
15: int t(void) { lxi_init(); return 0; }
|
205
|
+
/* end */
|
206
|
+
|
207
|
+
--------------------
|
208
|
+
|
209
|
+
have_library: checking for lxi_init() in -lliblxi... -------------------- no
|
210
|
+
|
211
|
+
DYLD_FALLBACK_LIBRARY_PATH=.:/Users/rob/.asdf/installs/ruby/3.1.3/lib "clang -o conftest -I/Users/rob/.asdf/installs/ruby/3.1.3/include/ruby-3.1.0/arm64-darwin22 -I/Users/rob/.asdf/installs/ruby/3.1.3/include/ruby-3.1.0/ruby/backward -I/Users/rob/.asdf/installs/ruby/3.1.3/include/ruby-3.1.0 -I/Users/rob/Code/ruby/lxi_rb/bin -I/Users/rob/.asdf/installs/ruby/3.1.3/include -I/opt/homebrew/opt/gmp/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -fdeclspec -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdivision-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wextra-tokens -Wundef -fno-common -pipe conftest.c -L. -L/Users/rob/.asdf/installs/ruby/3.1.3/lib -L. -L/Users/rob/.asdf/installs/ruby/3.1.3/lib -fstack-protector-strong -L/opt/homebrew/opt/gmp/lib -L/usr/local/lib -lruby.3.1 -lliblxi "
|
212
|
+
conftest.c:14:57: error: use of undeclared identifier 'lxi_init'
|
213
|
+
int t(void) { void ((*volatile p)()); p = (void ((*)()))lxi_init; return !p; }
|
214
|
+
^
|
215
|
+
1 error generated.
|
216
|
+
checked program was:
|
217
|
+
/* begin */
|
218
|
+
1: #include "ruby.h"
|
219
|
+
2:
|
220
|
+
3: /*top*/
|
221
|
+
4: extern int t(void);
|
222
|
+
5: int main(int argc, char **argv)
|
223
|
+
6: {
|
224
|
+
7: if (argc > 1000000) {
|
225
|
+
8: int (* volatile tp)(void)=(int (*)(void))&t;
|
226
|
+
9: printf("%d", (*tp)());
|
227
|
+
10: }
|
228
|
+
11:
|
229
|
+
12: return !!argv[argc];
|
230
|
+
13: }
|
231
|
+
14: int t(void) { void ((*volatile p)()); p = (void ((*)()))lxi_init; return !p; }
|
232
|
+
/* end */
|
233
|
+
|
234
|
+
DYLD_FALLBACK_LIBRARY_PATH=.:/Users/rob/.asdf/installs/ruby/3.1.3/lib "clang -o conftest -I/Users/rob/.asdf/installs/ruby/3.1.3/include/ruby-3.1.0/arm64-darwin22 -I/Users/rob/.asdf/installs/ruby/3.1.3/include/ruby-3.1.0/ruby/backward -I/Users/rob/.asdf/installs/ruby/3.1.3/include/ruby-3.1.0 -I/Users/rob/Code/ruby/lxi_rb/bin -I/Users/rob/.asdf/installs/ruby/3.1.3/include -I/opt/homebrew/opt/gmp/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -fdeclspec -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdivision-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wextra-tokens -Wundef -fno-common -pipe conftest.c -L. -L/Users/rob/.asdf/installs/ruby/3.1.3/lib -L. -L/Users/rob/.asdf/installs/ruby/3.1.3/lib -fstack-protector-strong -L/opt/homebrew/opt/gmp/lib -L/usr/local/lib -lruby.3.1 -lliblxi "
|
235
|
+
ld: library not found for -lliblxi
|
236
|
+
clang: error: linker command failed with exit code 1 (use -v to see invocation)
|
237
|
+
checked program was:
|
238
|
+
/* begin */
|
239
|
+
1: #include "ruby.h"
|
240
|
+
2:
|
241
|
+
3: /*top*/
|
242
|
+
4: extern int t(void);
|
243
|
+
5: int main(int argc, char **argv)
|
244
|
+
6: {
|
245
|
+
7: if (argc > 1000000) {
|
246
|
+
8: int (* volatile tp)(void)=(int (*)(void))&t;
|
247
|
+
9: printf("%d", (*tp)());
|
248
|
+
10: }
|
249
|
+
11:
|
250
|
+
12: return !!argv[argc];
|
251
|
+
13: }
|
252
|
+
14: extern void lxi_init();
|
253
|
+
15: int t(void) { lxi_init(); return 0; }
|
254
|
+
/* end */
|
255
|
+
|
256
|
+
--------------------
|
257
|
+
|
258
|
+
have_func: checking for lxi_init()... -------------------- no
|
259
|
+
|
260
|
+
DYLD_FALLBACK_LIBRARY_PATH=.:/Users/rob/.asdf/installs/ruby/3.1.3/lib "clang -o conftest -I/Users/rob/.asdf/installs/ruby/3.1.3/include/ruby-3.1.0/arm64-darwin22 -I/Users/rob/.asdf/installs/ruby/3.1.3/include/ruby-3.1.0/ruby/backward -I/Users/rob/.asdf/installs/ruby/3.1.3/include/ruby-3.1.0 -I/Users/rob/Code/ruby/lxi_rb/bin -I/Users/rob/.asdf/installs/ruby/3.1.3/include -I/opt/homebrew/opt/gmp/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -fdeclspec -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdivision-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wextra-tokens -Wundef -fno-common -pipe conftest.c -L. -L/Users/rob/.asdf/installs/ruby/3.1.3/lib -L. -L/Users/rob/.asdf/installs/ruby/3.1.3/lib -fstack-protector-strong -L/opt/homebrew/opt/gmp/lib -L/usr/local/lib -lruby.3.1 "
|
261
|
+
conftest.c:14:57: error: use of undeclared identifier 'lxi_init'
|
262
|
+
int t(void) { void ((*volatile p)()); p = (void ((*)()))lxi_init; return !p; }
|
263
|
+
^
|
264
|
+
1 error generated.
|
265
|
+
checked program was:
|
266
|
+
/* begin */
|
267
|
+
1: #include "ruby.h"
|
268
|
+
2:
|
269
|
+
3: /*top*/
|
270
|
+
4: extern int t(void);
|
271
|
+
5: int main(int argc, char **argv)
|
272
|
+
6: {
|
273
|
+
7: if (argc > 1000000) {
|
274
|
+
8: int (* volatile tp)(void)=(int (*)(void))&t;
|
275
|
+
9: printf("%d", (*tp)());
|
276
|
+
10: }
|
277
|
+
11:
|
278
|
+
12: return !!argv[argc];
|
279
|
+
13: }
|
280
|
+
14: int t(void) { void ((*volatile p)()); p = (void ((*)()))lxi_init; return !p; }
|
281
|
+
/* end */
|
282
|
+
|
283
|
+
DYLD_FALLBACK_LIBRARY_PATH=.:/Users/rob/.asdf/installs/ruby/3.1.3/lib "clang -o conftest -I/Users/rob/.asdf/installs/ruby/3.1.3/include/ruby-3.1.0/arm64-darwin22 -I/Users/rob/.asdf/installs/ruby/3.1.3/include/ruby-3.1.0/ruby/backward -I/Users/rob/.asdf/installs/ruby/3.1.3/include/ruby-3.1.0 -I/Users/rob/Code/ruby/lxi_rb/bin -I/Users/rob/.asdf/installs/ruby/3.1.3/include -I/opt/homebrew/opt/gmp/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -fdeclspec -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdivision-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wextra-tokens -Wundef -fno-common -pipe conftest.c -L. -L/Users/rob/.asdf/installs/ruby/3.1.3/lib -L. -L/Users/rob/.asdf/installs/ruby/3.1.3/lib -fstack-protector-strong -L/opt/homebrew/opt/gmp/lib -L/usr/local/lib -lruby.3.1 "
|
284
|
+
Undefined symbols for architecture arm64:
|
285
|
+
"_lxi_init", referenced from:
|
286
|
+
_t in conftest-1fadab.o
|
287
|
+
ld: symbol(s) not found for architecture arm64
|
288
|
+
clang: error: linker command failed with exit code 1 (use -v to see invocation)
|
289
|
+
checked program was:
|
290
|
+
/* begin */
|
291
|
+
1: #include "ruby.h"
|
292
|
+
2:
|
293
|
+
3: /*top*/
|
294
|
+
4: extern int t(void);
|
295
|
+
5: int main(int argc, char **argv)
|
296
|
+
6: {
|
297
|
+
7: if (argc > 1000000) {
|
298
|
+
8: int (* volatile tp)(void)=(int (*)(void))&t;
|
299
|
+
9: printf("%d", (*tp)());
|
300
|
+
10: }
|
301
|
+
11:
|
302
|
+
12: return !!argv[argc];
|
303
|
+
13: }
|
304
|
+
14: extern void lxi_init();
|
305
|
+
15: int t(void) { lxi_init(); return 0; }
|
306
|
+
/* end */
|
307
|
+
|
308
|
+
--------------------
|
309
|
+
|
310
|
+
have_func: checking for lxi_init() in lxi... -------------------- no
|
311
|
+
|
312
|
+
DYLD_FALLBACK_LIBRARY_PATH=.:/Users/rob/.asdf/installs/ruby/3.1.3/lib "clang -o conftest -I/Users/rob/.asdf/installs/ruby/3.1.3/include/ruby-3.1.0/arm64-darwin22 -I/Users/rob/.asdf/installs/ruby/3.1.3/include/ruby-3.1.0/ruby/backward -I/Users/rob/.asdf/installs/ruby/3.1.3/include/ruby-3.1.0 -I/Users/rob/Code/ruby/lxi_rb/bin -I/Users/rob/.asdf/installs/ruby/3.1.3/include -I/opt/homebrew/opt/gmp/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -fdeclspec -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdivision-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wextra-tokens -Wundef -fno-common -pipe conftest.c -L. -L/Users/rob/.asdf/installs/ruby/3.1.3/lib -L. -L/Users/rob/.asdf/installs/ruby/3.1.3/lib -fstack-protector-strong -L/opt/homebrew/opt/gmp/lib -L/usr/local/lib -lruby.3.1 "
|
313
|
+
conftest.c:3:10: fatal error: 'lxi' file not found
|
314
|
+
#include <lxi>
|
315
|
+
^~~~~
|
316
|
+
1 error generated.
|
317
|
+
checked program was:
|
318
|
+
/* begin */
|
319
|
+
1: #include "ruby.h"
|
320
|
+
2:
|
321
|
+
3: #include <lxi>
|
322
|
+
4:
|
323
|
+
5: /*top*/
|
324
|
+
6: extern int t(void);
|
325
|
+
7: int main(int argc, char **argv)
|
326
|
+
8: {
|
327
|
+
9: if (argc > 1000000) {
|
328
|
+
10: int (* volatile tp)(void)=(int (*)(void))&t;
|
329
|
+
11: printf("%d", (*tp)());
|
330
|
+
12: }
|
331
|
+
13:
|
332
|
+
14: return !!argv[argc];
|
333
|
+
15: }
|
334
|
+
16: int t(void) { void ((*volatile p)()); p = (void ((*)()))lxi_init; return !p; }
|
335
|
+
/* end */
|
336
|
+
|
337
|
+
DYLD_FALLBACK_LIBRARY_PATH=.:/Users/rob/.asdf/installs/ruby/3.1.3/lib "clang -o conftest -I/Users/rob/.asdf/installs/ruby/3.1.3/include/ruby-3.1.0/arm64-darwin22 -I/Users/rob/.asdf/installs/ruby/3.1.3/include/ruby-3.1.0/ruby/backward -I/Users/rob/.asdf/installs/ruby/3.1.3/include/ruby-3.1.0 -I/Users/rob/Code/ruby/lxi_rb/bin -I/Users/rob/.asdf/installs/ruby/3.1.3/include -I/opt/homebrew/opt/gmp/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -fdeclspec -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdivision-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wextra-tokens -Wundef -fno-common -pipe conftest.c -L. -L/Users/rob/.asdf/installs/ruby/3.1.3/lib -L. -L/Users/rob/.asdf/installs/ruby/3.1.3/lib -fstack-protector-strong -L/opt/homebrew/opt/gmp/lib -L/usr/local/lib -lruby.3.1 "
|
338
|
+
conftest.c:3:10: fatal error: 'lxi' file not found
|
339
|
+
#include <lxi>
|
340
|
+
^~~~~
|
341
|
+
1 error generated.
|
342
|
+
checked program was:
|
343
|
+
/* begin */
|
344
|
+
1: #include "ruby.h"
|
345
|
+
2:
|
346
|
+
3: #include <lxi>
|
347
|
+
4:
|
348
|
+
5: /*top*/
|
349
|
+
6: extern int t(void);
|
350
|
+
7: int main(int argc, char **argv)
|
351
|
+
8: {
|
352
|
+
9: if (argc > 1000000) {
|
353
|
+
10: int (* volatile tp)(void)=(int (*)(void))&t;
|
354
|
+
11: printf("%d", (*tp)());
|
355
|
+
12: }
|
356
|
+
13:
|
357
|
+
14: return !!argv[argc];
|
358
|
+
15: }
|
359
|
+
16: extern void lxi_init();
|
360
|
+
17: int t(void) { lxi_init(); return 0; }
|
361
|
+
/* end */
|
362
|
+
|
363
|
+
--------------------
|
364
|
+
|
365
|
+
have_func: checking for lxi_init() in lxi.h... -------------------- no
|
366
|
+
|
367
|
+
DYLD_FALLBACK_LIBRARY_PATH=.:/Users/rob/.asdf/installs/ruby/3.1.3/lib "clang -o conftest -I/Users/rob/.asdf/installs/ruby/3.1.3/include/ruby-3.1.0/arm64-darwin22 -I/Users/rob/.asdf/installs/ruby/3.1.3/include/ruby-3.1.0/ruby/backward -I/Users/rob/.asdf/installs/ruby/3.1.3/include/ruby-3.1.0 -I/Users/rob/Code/ruby/lxi_rb/bin -I/Users/rob/.asdf/installs/ruby/3.1.3/include -I/opt/homebrew/opt/gmp/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -fdeclspec -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdivision-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wextra-tokens -Wundef -fno-common -pipe conftest.c -L. -L/Users/rob/.asdf/installs/ruby/3.1.3/lib -L. -L/Users/rob/.asdf/installs/ruby/3.1.3/lib -fstack-protector-strong -L/opt/homebrew/opt/gmp/lib -L/usr/local/lib -lruby.3.1 "
|
368
|
+
conftest.c:3:10: fatal error: 'lxi.h' file not found
|
369
|
+
#include <lxi.h>
|
370
|
+
^~~~~~~
|
371
|
+
1 error generated.
|
372
|
+
checked program was:
|
373
|
+
/* begin */
|
374
|
+
1: #include "ruby.h"
|
375
|
+
2:
|
376
|
+
3: #include <lxi.h>
|
377
|
+
4:
|
378
|
+
5: /*top*/
|
379
|
+
6: extern int t(void);
|
380
|
+
7: int main(int argc, char **argv)
|
381
|
+
8: {
|
382
|
+
9: if (argc > 1000000) {
|
383
|
+
10: int (* volatile tp)(void)=(int (*)(void))&t;
|
384
|
+
11: printf("%d", (*tp)());
|
385
|
+
12: }
|
386
|
+
13:
|
387
|
+
14: return !!argv[argc];
|
388
|
+
15: }
|
389
|
+
16: int t(void) { void ((*volatile p)()); p = (void ((*)()))lxi_init; return !p; }
|
390
|
+
/* end */
|
391
|
+
|
392
|
+
DYLD_FALLBACK_LIBRARY_PATH=.:/Users/rob/.asdf/installs/ruby/3.1.3/lib "clang -o conftest -I/Users/rob/.asdf/installs/ruby/3.1.3/include/ruby-3.1.0/arm64-darwin22 -I/Users/rob/.asdf/installs/ruby/3.1.3/include/ruby-3.1.0/ruby/backward -I/Users/rob/.asdf/installs/ruby/3.1.3/include/ruby-3.1.0 -I/Users/rob/Code/ruby/lxi_rb/bin -I/Users/rob/.asdf/installs/ruby/3.1.3/include -I/opt/homebrew/opt/gmp/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -fdeclspec -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdivision-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wextra-tokens -Wundef -fno-common -pipe conftest.c -L. -L/Users/rob/.asdf/installs/ruby/3.1.3/lib -L. -L/Users/rob/.asdf/installs/ruby/3.1.3/lib -fstack-protector-strong -L/opt/homebrew/opt/gmp/lib -L/usr/local/lib -lruby.3.1 "
|
393
|
+
conftest.c:3:10: fatal error: 'lxi.h' file not found
|
394
|
+
#include <lxi.h>
|
395
|
+
^~~~~~~
|
396
|
+
1 error generated.
|
397
|
+
checked program was:
|
398
|
+
/* begin */
|
399
|
+
1: #include "ruby.h"
|
400
|
+
2:
|
401
|
+
3: #include <lxi.h>
|
402
|
+
4:
|
403
|
+
5: /*top*/
|
404
|
+
6: extern int t(void);
|
405
|
+
7: int main(int argc, char **argv)
|
406
|
+
8: {
|
407
|
+
9: if (argc > 1000000) {
|
408
|
+
10: int (* volatile tp)(void)=(int (*)(void))&t;
|
409
|
+
11: printf("%d", (*tp)());
|
410
|
+
12: }
|
411
|
+
13:
|
412
|
+
14: return !!argv[argc];
|
413
|
+
15: }
|
414
|
+
16: extern void lxi_init();
|
415
|
+
17: int t(void) { lxi_init(); return 0; }
|
416
|
+
/* end */
|
417
|
+
|
418
|
+
--------------------
|
419
|
+
|
420
|
+
have_library: checking for lxi_init() in -llxi... -------------------- no
|
421
|
+
|
422
|
+
DYLD_FALLBACK_LIBRARY_PATH=.:/Users/rob/.asdf/installs/ruby/3.1.3/lib "clang -o conftest -I/Users/rob/.asdf/installs/ruby/3.1.3/include/ruby-3.1.0/arm64-darwin22 -I/Users/rob/.asdf/installs/ruby/3.1.3/include/ruby-3.1.0/ruby/backward -I/Users/rob/.asdf/installs/ruby/3.1.3/include/ruby-3.1.0 -I/Users/rob/Code/ruby/lxi_rb/bin -I/Users/rob/.asdf/installs/ruby/3.1.3/include -I/opt/homebrew/opt/gmp/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -fdeclspec -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdivision-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wextra-tokens -Wundef -fno-common -pipe conftest.c -L. -L/Users/rob/.asdf/installs/ruby/3.1.3/lib -L. -L/Users/rob/.asdf/installs/ruby/3.1.3/lib -fstack-protector-strong -L/opt/homebrew/opt/gmp/lib -L/usr/local/lib -lruby.3.1 -llxi "
|
423
|
+
conftest.c:3:10: fatal error: 'lxi.h' file not found
|
424
|
+
#include <lxi.h>
|
425
|
+
^~~~~~~
|
426
|
+
1 error generated.
|
427
|
+
checked program was:
|
428
|
+
/* begin */
|
429
|
+
1: #include "ruby.h"
|
430
|
+
2:
|
431
|
+
3: #include <lxi.h>
|
432
|
+
4:
|
433
|
+
5: /*top*/
|
434
|
+
6: extern int t(void);
|
435
|
+
7: int main(int argc, char **argv)
|
436
|
+
8: {
|
437
|
+
9: if (argc > 1000000) {
|
438
|
+
10: int (* volatile tp)(void)=(int (*)(void))&t;
|
439
|
+
11: printf("%d", (*tp)());
|
440
|
+
12: }
|
441
|
+
13:
|
442
|
+
14: return !!argv[argc];
|
443
|
+
15: }
|
444
|
+
16: int t(void) { void ((*volatile p)()); p = (void ((*)()))lxi_init; return !p; }
|
445
|
+
/* end */
|
446
|
+
|
447
|
+
DYLD_FALLBACK_LIBRARY_PATH=.:/Users/rob/.asdf/installs/ruby/3.1.3/lib "clang -o conftest -I/Users/rob/.asdf/installs/ruby/3.1.3/include/ruby-3.1.0/arm64-darwin22 -I/Users/rob/.asdf/installs/ruby/3.1.3/include/ruby-3.1.0/ruby/backward -I/Users/rob/.asdf/installs/ruby/3.1.3/include/ruby-3.1.0 -I/Users/rob/Code/ruby/lxi_rb/bin -I/Users/rob/.asdf/installs/ruby/3.1.3/include -I/opt/homebrew/opt/gmp/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -fdeclspec -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdivision-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wextra-tokens -Wundef -fno-common -pipe conftest.c -L. -L/Users/rob/.asdf/installs/ruby/3.1.3/lib -L. -L/Users/rob/.asdf/installs/ruby/3.1.3/lib -fstack-protector-strong -L/opt/homebrew/opt/gmp/lib -L/usr/local/lib -lruby.3.1 -llxi "
|
448
|
+
conftest.c:3:10: fatal error: 'lxi.h' file not found
|
449
|
+
#include <lxi.h>
|
450
|
+
^~~~~~~
|
451
|
+
1 error generated.
|
452
|
+
checked program was:
|
453
|
+
/* begin */
|
454
|
+
1: #include "ruby.h"
|
455
|
+
2:
|
456
|
+
3: #include <lxi.h>
|
457
|
+
4:
|
458
|
+
5: /*top*/
|
459
|
+
6: extern int t(void);
|
460
|
+
7: int main(int argc, char **argv)
|
461
|
+
8: {
|
462
|
+
9: if (argc > 1000000) {
|
463
|
+
10: int (* volatile tp)(void)=(int (*)(void))&t;
|
464
|
+
11: printf("%d", (*tp)());
|
465
|
+
12: }
|
466
|
+
13:
|
467
|
+
14: return !!argv[argc];
|
468
|
+
15: }
|
469
|
+
16: extern void lxi_init();
|
470
|
+
17: int t(void) { lxi_init(); return 0; }
|
471
|
+
/* end */
|
472
|
+
|
473
|
+
--------------------
|
474
|
+
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lxi_rb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rob Carruthers
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-05-
|
11
|
+
date: 2023-05-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ffi
|
@@ -32,7 +32,6 @@ executables: []
|
|
32
32
|
extensions: []
|
33
33
|
extra_rdoc_files: []
|
34
34
|
files:
|
35
|
-
- ".rubocop.yml"
|
36
35
|
- ".tool-versions"
|
37
36
|
- ".vscode/settings.json"
|
38
37
|
- CHANGELOG.md
|
@@ -42,15 +41,16 @@ files:
|
|
42
41
|
- README.md
|
43
42
|
- Rakefile
|
44
43
|
- examples/discover.rb
|
45
|
-
- examples/
|
44
|
+
- examples/scpi_query.rb
|
46
45
|
- lib/lxi/callbacks.rb
|
47
46
|
- lib/lxi/constants.rb
|
48
47
|
- lib/lxi/device.rb
|
49
|
-
- lib/lxi/discovery.rb
|
50
48
|
- lib/lxi/functions.rb
|
51
49
|
- lib/lxi/methods.rb
|
50
|
+
- lib/lxi/net_finder.rb
|
52
51
|
- lib/lxi/version.rb
|
53
52
|
- lib/lxi_rb.rb
|
53
|
+
- mkmf.log
|
54
54
|
- sig/lxi_rb.rbs
|
55
55
|
homepage: https://github.com/robcarruthers/lxi_rb
|
56
56
|
licenses:
|
data/.rubocop.yml
DELETED
@@ -1,55 +0,0 @@
|
|
1
|
-
# Rubocop config for lxi_rb rubygem
|
2
|
-
AllCops:
|
3
|
-
TargetRubyVersion: 3.1
|
4
|
-
EnabledByDefault: true
|
5
|
-
AutoCorrect: true
|
6
|
-
|
7
|
-
require:
|
8
|
-
- rubocop-performance
|
9
|
-
- rubocop-rake
|
10
|
-
- rubocop-minitest
|
11
|
-
|
12
|
-
inherit_gem:
|
13
|
-
syntax_tree: config/rubocop.yml
|
14
|
-
|
15
|
-
Style/StringLiterals:
|
16
|
-
EnforcedStyle: single_quotes
|
17
|
-
|
18
|
-
Style/StringLiteralsInInterpolation:
|
19
|
-
Enabled: false
|
20
|
-
|
21
|
-
Layout/LineLength:
|
22
|
-
Max: 120
|
23
|
-
|
24
|
-
Metrics/MethodLength:
|
25
|
-
Max: 30
|
26
|
-
|
27
|
-
Metrics/BlockLength:
|
28
|
-
Max: 30
|
29
|
-
|
30
|
-
Metrics/ClassLength:
|
31
|
-
Enabled: false
|
32
|
-
|
33
|
-
Documentation:
|
34
|
-
Enabled: false
|
35
|
-
|
36
|
-
Style/Copyright:
|
37
|
-
Enabled: false
|
38
|
-
|
39
|
-
Style/DocumentationMethod:
|
40
|
-
Enabled: false
|
41
|
-
|
42
|
-
Lint/ConstantResolution:
|
43
|
-
Enabled: false
|
44
|
-
|
45
|
-
Bundler/GemComment:
|
46
|
-
Enabled: false
|
47
|
-
|
48
|
-
Style/ConstantVisibility:
|
49
|
-
Enabled: false
|
50
|
-
|
51
|
-
Style/IpAddresses:
|
52
|
-
Enabled: false
|
53
|
-
|
54
|
-
Style/MissingElse:
|
55
|
-
Enabled: false
|
data/examples/scpi.rb
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
require_relative '../lib/lxi_rb'
|
3
|
-
|
4
|
-
# Initialize LXI library
|
5
|
-
Lxi.init_lxi_session
|
6
|
-
|
7
|
-
# Lxi.search will return an Array of device identifiers and IP addresses
|
8
|
-
devices = Lxi.search
|
9
|
-
abort 'No devices found' if devices.nil? || devices.empty?
|
10
|
-
|
11
|
-
# Create a new LXI device
|
12
|
-
device_ip_address = devices[0][:address]
|
13
|
-
device_type = :vxi11
|
14
|
-
command = '*IDN?'
|
15
|
-
|
16
|
-
Lxi::Device.new(device_ip_address, device_type) do |device|
|
17
|
-
device.send command
|
18
|
-
sleep 0.05
|
19
|
-
puts device.read 512
|
20
|
-
end
|
data/lib/lxi/discovery.rb
DELETED
@@ -1,41 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
module Lxi
|
3
|
-
# Search for LXI-11 instruments on the network and return array of instruments
|
4
|
-
def self.search(timeout: 1000, type: :vxi11)
|
5
|
-
raise(Error, 'LXI Library Initialisation Error') unless lxi_init == LXI_OK
|
6
|
-
|
7
|
-
devices = []
|
8
|
-
device_callback =
|
9
|
-
FFI::Function.new(:void, %i[pointer pointer]) do |address, id|
|
10
|
-
devices << { address: address.read_string, id: id.read_string }
|
11
|
-
end
|
12
|
-
|
13
|
-
info = FFIFunctions::LxiInfo.new
|
14
|
-
info[:device] = device_callback
|
15
|
-
|
16
|
-
result = lxi_discover_internal(info, timeout, type)
|
17
|
-
raise(Error, "Discovery error: #{result}") unless result == LXI_OK
|
18
|
-
|
19
|
-
sleep(0.5)
|
20
|
-
devices
|
21
|
-
end
|
22
|
-
|
23
|
-
def self.asdf
|
24
|
-
puts 'asdf'
|
25
|
-
end
|
26
|
-
|
27
|
-
# Discover LXI-11 devices on the LAN
|
28
|
-
def self.discover(timeout: 1000, type: :vxi11)
|
29
|
-
Lxi.init_lxi_session
|
30
|
-
|
31
|
-
info = FFIFunctions::LxiInfo.new
|
32
|
-
info[:broadcast] = BroadcastCallback
|
33
|
-
info[:device] = DeviceCallback
|
34
|
-
|
35
|
-
puts("Searching for LXI devices - please wait...\n\n")
|
36
|
-
|
37
|
-
result = lxi_discover_internal(info, timeout, type)
|
38
|
-
|
39
|
-
puts("Error during discovery: #{result}") if result.negative?
|
40
|
-
end
|
41
|
-
end
|