Certlint ASN1Validator compiling error

6 views
Skip to first unread message

Paulo Oliveira

unread,
Jun 5, 2021, 1:00:33 AMJun 5
to RubyInstaller
Windows version: Windows Server 2019 (latest updates)
Ruby version: ruby 3.0.1p64 (2021-04-05 revision 0fb782ee38) [x64-mingw32]
RubyGems version: 3.2.15
Installed Ruby with Devkit

I need to run Certlint (GitHub - certlint/certlint: X.509 certificate linter) on my Windows Server 2019. After checking documentation Certlint needs asn1validator, which instructions to compile can be found here: certlint/README at master · certlint/certlint · GitHub.

However, when I try to compile I am getting the following errors:

compiling asn1validator.c
In file included from asn1validator.c:23:
./asn_system.h:34: warning: "snprintf" redefined
   34 | #define  snprintf _snprintf
      |
In file included from C:/Ruby30-x64/include/ruby-3.0.0/ruby/ruby.h:144,
                 from asn1validator.c:16:
C:/Ruby30-x64/include/ruby-3.0.0/ruby/subst.h:14: note: this is the location of the previous definition
   14 | #define snprintf ruby_snprintf
      |
In file included from asn1validator.c:23:
./asn_system.h:35: warning: "vsnprintf" redefined
   35 | #define  vsnprintf _vsnprintf
      |
In file included from C:/Ruby30-x64/include/ruby-3.0.0/ruby/ruby.h:144,
                 from asn1validator.c:16:
C:/Ruby30-x64/include/ruby-3.0.0/ruby/subst.h:15: note: this is the location of the previous definition
   15 | #define vsnprintf ruby_vsnprintf
      |
=============================================================
And also:

linking shared-object asn1validator.so
C:/Ruby30-x64/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: GeneralizedTime.o:GeneralizedTime.c:(.text+0x7a): undefined reference to `setenv'
C:/Ruby30-x64/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: GeneralizedTime.o:GeneralizedTime.c:(.text+0xad): undefined reference to `setenv'
C:/Ruby30-x64/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: GeneralizedTime.o:GeneralizedTime.c:(.text+0x113): undefined reference to `setenv'
C:/Ruby30-x64/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: GeneralizedTime.o:GeneralizedTime.c:(.text+0x13d): undefined reference to `setenv'
C:/Ruby30-x64/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: GeneralizedTime.o:GeneralizedTime.c:(.text+0x168): undefined reference to `setenv'
C:/Ruby30-x64/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: GeneralizedTime.o:GeneralizedTime.c:(.text+0x18d): undefined reference to `unsetenv'
collect2.exe: error: ld returned 1 exit status
make: *** [Makefile:262: asn1validator.so] Error 1
==========================================================

So, my question is how can I make it work?
Reply all
Reply to author
Forward
0 new messages