~fjc

Recent activity

Re: [0.11.0-dev] cImport AnalysisFail with ruby-3.3-rc 4 months ago

From Frank J. Cameron to ~andrewrk/ziglang

On 5/21/23, Frank J. Cameron <fjc@fastmail.net> wrote:
> On 5/20/23, Frank J. Cameron <fjc@fastmail.net> wrote:
>> Playing with a very simple ruby zig extension[1].  It builds successfully
>> with ruby 2.5, 2.6, 2.7, 3.0, 3.1, and 3.2[2].  But, fails with
>> 3.3-rc[3]:
>>
>> error: use of undeclared identifier 'struct_s'
>> error: C import failed: AnalysisFail
>
> From git bisect, this is the line where the analysis fails:
>
> 	#define REF_EDGE(s, p) (offsetof(struct s, p))

$ zig translate-c -Iinclude -I.ext/include/x86_64-linux -I/usr/include

Re: [0.11.0-dev] cImport AnalysisFail with ruby-3.3-rc 4 months ago

From Frank J. Cameron to ~andrewrk/ziglang

On 5/20/23, Frank J. Cameron <fjc@fastmail.net> wrote:
> Playing with a very simple ruby zig extension[1].  It builds successfully
> with ruby 2.5, 2.6, 2.7, 3.0, 3.1, and 3.2[2].  But, fails with 3.3-rc[3]:
>
> error: use of undeclared identifier 'struct_s'
> error: C import failed: AnalysisFail

From git bisect, this is the line where the analysis fails:

	#define REF_EDGE(s, p) (offsetof(struct s, p))

running bash -c (cd /gem/test/zigrb/ext && rm -rf zig-cache && zig build)
7142328a94c85cc5f23630396f248b32133f87ab is the first bad commit
commit 7142328a94c85cc5f23630396f248b32133f87ab

[0.11.0-dev] cImport AnalysisFail with ruby-3.3-rc 4 months ago

From Frank J. Cameron to ~andrewrk/ziglang

Playing with a very simple ruby zig extension[1].  It builds successfully
with ruby 2.5, 2.6, 2.7, 3.0, 3.1, and 3.2[2].  But, fails with 3.3-rc[3]:

+ zig version
0.11.0-dev.3220+447a30299
+ ruby -v
ruby 3.3.0preview1 (2023-05-12 master a1b01e7701) [x86_64-linux]

zig build-lib zigrb ReleaseSafe native: error: the following command
failed with 2 compilation errors:
/usr/local/bin/zig build-lib
/usr/local/bundle/gems/zigrb-0.0.1/ext/src/main.zig
-I/usr/local/include/ruby-3.3.0+0/x86_64-linux
-I/usr/local/include/ruby-3.3.0+0 -L/usr/local/lib -lruby -lm