[ruby-core:99544] Re: Core Ruby Build question
From:
Maurice Smulders <maurice.smulders@...>
Date:
2020-08-10 15:29:43 UTC
List:
ruby-core #99544
Hello, Forget the word 'cross-compiling' - I can fix it in the Buildroot post scripts, but I am looking for information about how the directory assignment is done inside the normal build process. I want to do it in a more clean way. Maurice On Wed, Aug 5, 2020 at 2:07 PM Maurice Smulders <maurice.smulders@genevatech.net> wrote: > > Hello, > > As cross compiling Ruby Gems other than windows versions has proven to > be impossibly difficult. i resorted to another solution. I installed > the needed files from cbor-ruby into the /ext subtree into the core > ruby source in our buildroot environment. I am mostly successful, > except for one small hiccup. > > Ruby version 2.7.1 > > My source tree looks as follows: > > |-- ext > | |-- cbor > | | |-- buffer.c > | | |-- buffer.h > | | |-- buffer_class.c > | | |-- buffer_class.h > | | |-- cbor.gemspec > | | |-- cbor.h > | | |-- compat.h > | | |-- core_ext.c > | | |-- core_ext.h > | | |-- extconf.rb > | | |-- lib > | | | |-- cbor > | | | | `-- version.rb > | | | `-- cbor.rb > | | |-- packer.c > | | |-- packer.h > | | |-- packer_class.c > | | |-- packer_class.h > | | |-- rbinit.c > | | |-- renamer.h > | | |-- rmem.c > | | |-- rmem.h > | | |-- sysdep.h > | | |-- sysdep_endian.h > | | |-- sysdep_types.h > | | |-- unpacker.c > | | |-- unpacker.h > | | |-- unpacker_class.c > | | `-- unpacker_class.h > > Target installation is: > ./usr/lib/libtinycbor.so > ./usr/lib/ruby/2.7.0/cbor > ./usr/lib/ruby/2.7.0/cbor/cbor > ./usr/lib/ruby/2.7.0/cbor/cbor/version.rb > ./usr/lib/ruby/2.7.0/cbor/cbor.rb > ./usr/lib/ruby/2.7.0/powerpc-linux-gnuspe/cbor > ./usr/lib/ruby/2.7.0/powerpc-linux-gnuspe/cbor/cbor.so > ./usr/lib/ruby/gems/2.7.0/specifications/default/cbor-0.5.9.6.gemspec > ./usr/lib/ruby/gems/2.7.0/gems/cbor-0.5.9.6 > . > It needs to be: > ./usr/lib/ruby/2.7.0/cbor/version.rb > ./usr/lib/ruby/2.7.0/cbor.rb > ./usr/lib/ruby/2.7.0/powerpc-linux-gnuspe/cbor > ./usr/lib/ruby/2.7.0/powerpc-linux-gnuspe/cbor/cbor.so > ./usr/lib/ruby/gems/2.7.0/specifications/default/cbor-0.5.9.6.gemspec > ./usr/lib/ruby/gems/2.7.0/gems/cbor-0.5.9.6 > > Note the cbor.rb file and version.rb file need to be moved up one directory. > I have made changes to > > misc/expand_tabs.rb: cbor > > I also looked at other ext(ensions) like openssl: > > From: > ./ext/openssl/lib/openssl.rb > ./test/rubygems/fake_certlib/openssl.rb > > installed: > ./ruby/2.7.0/openssl.rb > > I am missing something, but don't know what yet... > What script/file controls the install destination? > > - Maurice > -- > Maurice Smulders -- Maurice Smulders, GTI Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>