Fix "cannot find the function: strcpy()" error on arm32 on Travis CI.#2686
Merged
Conversation
This issue happened when `libc.so` and `libm.so` path were not found and `ldd ruby` command also failed to print the shared dependencies in `test/fiddle/helper.rb`. See https://travis-ci.org/ruby/ruby/jobs/611483288#L3018 /home/travis/build/ruby/ruby/build/.ext/common/fiddle/import.rb:299:in `import_function': cannot find the function: strcpy() (Fiddle::DLError) * Set libc6:armhf as a installing dependency explicitly. * Remove arm32 from allow_failures.
shyouhei
added a commit
to shyouhei/ruby
that referenced
this pull request
Jan 23, 2020
The same as ruby#2686, but for musl libc. Musl is not named as libc.so.6 so the `ldd` hack below does not work.
matzbot
pushed a commit
that referenced
this pull request
Jan 24, 2020
The same as #2686, but for musl libc. Musl is not named as libc.so.6 so the `ldd` hack implemented some lines below does not work.
nobu
pushed a commit
to nobu/fiddle
that referenced
this pull request
Apr 29, 2020
The same as ruby/ruby#2686, but for musl libc. Musl is not named as libc.so.6 so the `ldd` hack implemented some lines below does not work.
nobu
pushed a commit
to nobu/fiddle
that referenced
this pull request
Apr 29, 2020
The same as ruby/ruby#2686, but for musl libc. Musl is not named as libc.so.6 so the `ldd` hack implemented some lines below does not work.
kou
pushed a commit
to ruby/fiddle
that referenced
this pull request
Apr 29, 2020
* Revert "[ruby/fiddle] Use ffi_closure_free by default. (#20)" This reverts commit ce6caade7c57a505f73086ccd7b33c14f7715f22. * Revert "[ruby/fiddle] test: use env Hash" This reverts commit 4d844cbaed518743776594fa5ae33b86fe176ad1. * Deprecate taint/trust and related methods, and make the methods no-ops This removes the related tests, and puts the related specs behind version guards. This affects all code in lib, including some libraries that may want to support older versions of Ruby. * More fixes for $SAFE/taint post merging * Fix "cannot find the function: strcpy()" error on arm32 on Travis CI. (#2686) This issue happened when `libc.so` and `libm.so` path were not found and `ldd ruby` command also failed to print the shared dependencies in `test/fiddle/helper.rb`. See https://travis-ci.org/ruby/ruby/jobs/611483288#L3018 /home/travis/build/ruby/ruby/build/.ext/common/fiddle/import.rb:299:in `import_function': cannot find the function: strcpy() (Fiddle::DLError) * Set libc6:armhf as a installing dependency explicitly. * Remove arm32 from allow_failures. * Drop executable bit of *.{yml,h,mk.tmpl} * pass appropriate libc path The same as ruby/ruby#2686, but for musl libc. Musl is not named as libc.so.6 so the `ldd` hack implemented some lines below does not work. * Use ffi_closure_free if available * ffi_closure_free is available in the bundled libffi * Fixed never-defined symbol name * use ffi_closure_alloc only with 3.2 or later * always use ffi_closure_alloc on Windows * Fixed a typo * Switch to download libffi source package to github releases from sourceware.org * Use osuosl instead of GitHub releases Because the package provided by GitHub releases is different from sourceware. * Do not set USE_FFI_CLOSURE_ALLOC=1 in fiddle on OpenBSD On OpenBSD, USE_FFI_CLOSURE_ALLOC was always set to 0 previously. In 633a1f15d8228236094ddee12e4e169d655ec49e, the code was modified in a way that it ended up being set to 1 on OpenBSD. However, that results in SIGABRT when running make test-all, inside ffi_closure_free. Setting USE_FFI_CLOSURE_ALLOC back to 0 fixes the issue. * Show libffi version only if set * Fix helper to not assume glibc * `Dir.glob` always returns an array It is not needed to test itself, but the element should be tested instead. Co-authored-by: Hiroshi SHIBATA <hsbt@ruby-lang.org> Co-authored-by: Jeremy Evans <code@jeremyevans.net> Co-authored-by: Jun Aruga <junaruga@users.noreply.github.com> Co-authored-by: Kazuhiro NISHIYAMA <zn@mbf.nifty.com> Co-authored-by: 卜部昌平 <shyouhei@ruby-lang.org> Co-authored-by: Paul Jordan <paullj1@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR is pointed out from https://bugs.ruby-lang.org/issues/16234#note-25 .
This PR fixes the failure in Travis CI arm32.
So, I remove arm32 case from allow_failures.
Here is the example of the issue.
https://travis-ci.org/ruby/ruby/jobs/611483288#L3018
This issue happened when
libc.soandlibm.sopath were not foundand
ldd rubycommand also failed to print the shared dependenciesin
test/fiddle/helper.rb.I set
libc6:armhfas a installing dependency explicitly.The Travis is succeeded at my forked repository.
https://travis-ci.org/junaruga/ruby/builds/615088201