Giter Site home page Giter Site logo

Comments (6)

muuvmuuv avatar muuvmuuv commented on July 30, 2024 1

Nevermind, I didn't see that you use aria2, it is an upstream issue aria2/aria2#2083

from ruby-build.

monfresh avatar monfresh commented on July 30, 2024

These types of installation failures are almost always due to one or more of these:

  • a broken development setup
  • installing things using both arm64 and Rosetta or arch -x86_64
  • missing or misconfigured or outdated tools
  • setting Ruby compilation settings globally in your shell file

The best way to fix this is to start over with a clean slate. If you want to try small fixes first, you could go through your shell files (such as .zprofile, .zshrc, .zlogin) and remove anything that could affect Ruby installation. I would also run brew doctor and see if it complains about anything.

If you don't have time to try to fix everything, and if you're willing to pay for a solution that will have you back up and running in 15 minutes, I built a paid product that can safely back up your dev setup, then clean it up in 1 minute. And then it will reinstall a proper and complete Ruby dev environment for you. I launched it about a year and a half ago, and I have over 1700 happy customers so far.

Check it out: https://www.rubyonmac.dev/

from ruby-build.

mislav avatar mislav commented on July 30, 2024

@thomasuster On top of what @monfresh already said, binutils from Homebrew should not be necessary for compiling Ruby. If you had them linked to PATH for some reason, unlink them with brew unlink binutils.

The compilation failure seems to be in the openssl compilation phase. It could be useful to install OpenSSL via Homebrew and link to that instead of having ruby-build compile openssl every time:

brew install [email protected]
RUBY_CONFIGURE_OPTS="--with-openssl-dir=$(brew --prefix [email protected])" rbenv install 3.2.2

See https://github.com/rbenv/ruby-build/wiki

Finally, this issue belongs to the ruby-build repo and not to rbenv proper. Transferring

from ruby-build.

muuvmuuv avatar muuvmuuv commented on July 30, 2024

Hey, I don't know if it is related, but on macOS 14 I get this compile errors:

Details
rbenv: /Users/marvin/.rbenv/versions/3.2.2 already exists
continue with installation? (y/N) y
/var/folders/p_/k06bmy8s1jb7nqrdwy7r_9qc0000gn/T/ruby-build.20231005132707.91186.ZQa1eS ~/Developer
Downloading openssl-3.1.2.tar.gz...
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString stringByStandardizingPath]: unrecognized selector sent to instance 0x600001f400c0'
*** First throw call stack:
(
	0   CoreFoundation                      0x000000018c3708c0 __exceptionPreprocess + 176
	1   libobjc.A.dylib                     0x000000018be69eb4 objc_exception_throw + 60
	2   CoreFoundation                      0x000000018c4223dc -[NSObject(NSObject) __retain_OA] + 0
	3   CoreFoundation                      0x000000018c2da9e4 ___forwarding___ + 1572
	4   CoreFoundation                      0x000000018c2da300 _CF_forwarding_prep_0 + 96
	5   Foundation                          0x000000018d3af4f0 -[NSProcessInfo arguments] + 188
	6   CoreFoundation                      0x000000018c3ebff8 __getDefaultArguments_block_invoke + 96
	7   libdispatch.dylib                   0x000000018c071910 _dispatch_client_callout + 20
	8   libdispatch.dylib                   0x000000018c07314c _dispatch_once_callout + 32
	9   CoreFoundation                      0x000000018c3eb994 _addBackstopValuesForIdentifierAndSource + 640
	10  CoreFoundation                      0x000000018c2a6254 __81-[_CFXPreferences(SourceAdditions) withNamedVolatileSourceForIdentifier:perform:]_block_invoke + 144
	11  CoreFoundation                      0x000000018c3eb63c -[_CFXPreferences withNamedVolatileSourceForIdentifier:perform:] + 272
	12  CoreFoundation                      0x000000018c2ac5c4 -[CFPrefsSearchListSource addNamedVolatileSourceForIdentifier:] + 136
	13  CoreFoundation                      0x000000018c42a8bc __108-[_CFXPreferences(SearchListAdditions) withSearchListForIdentifier:container:cloudConfigurationURL:perform:]_block_invoke.155 + 296
	14  CoreFoundation                      0x000000018c42a564 -[_CFXPreferences withSearchLists:] + 84
	15  CoreFoundation                      0x000000018c2a7b18 __108-[_CFXPreferences(SearchListAdditions) withSearchListForIdentifier:container:cloudConfigurationURL:perform:]_block_invoke + 300
	16  CoreFoundation                      0x000000018c42a710 -[_CFXPreferences withSearchListForIdentifier:container:cloudConfigurationURL:perform:] + 384
	17  CoreFoundation                      0x000000018c2a7440 -[_CFXPreferences copyAppValueForKey:identifier:container:configurationURL:] + 156
	18  CoreFoundation                      0x000000018c2a7368 _CFPreferencesCopyAppValueWithContainerAndConfiguration + 112
	19  libintl.8.dylib                     0x0000000103226574 _libintl_locale_name_default + 72
	20  libintl.8.dylib                     0x0000000103223f88 libintl_dcigettext + 1892
	21  aria2c                              0x0000000102ad62dc _GLOBAL__sub_I_UnknownOptionException.cc + 20
	22  dyld                                0x000000018bec15c8 ___ZZNK5dyld46Loader25findAndRunAllInitializersERNS_12Runti/opt/homebrew/bin/ruby-build: line 329: 91223 Abort trap: 6           aria2c --dry-run --no-conf=true ${ARIA2_OPTS} "$1" 1>&4 2>&1
meStateEENK3$_0clEv_block_invoke + 168
	23  dyld                                0x000000018bf06920 ___ZNK5dyld313MachOAnalyzer18forEachInitializerER11DiagnosticsRKNS0_15VMAddrConverterEU13block_pointerFvjEPKv_block_invoke.209 + 340
	24  dyld                                0x000000018bef9c60 ___ZNK5dyld39MachOFile14forEachSectionEU13block_pointerFvRKNS0_11SectionInfoEbRbE_block_invoke + 496
	25  dyld                                0x000000018bea12fc _ZNK5dyld39MachOFile18forEachLoadCommandER11DiagnosticsU13block_pointerFvPK12load_commandRbE + 300
	26  dyld                                0x000000018bef8c98 _ZNK5dyld39MachOFile14forEachSectionEU13block_pointerFvRKNS0_11SectionInfoEbRbE + 192
	27  dyld                                0x000000018bf06434 _ZNK5dyld313MachOAnalyzer18forEachInitializerER11DiagnosticsRKNS0_15VMAddrConverterEU13block_pointerFvjEPKv + 516
	28  dyld                                0x000000018bebd798 _ZNK5dyld46Loader25findAndRunAllInitializersERNS_12RuntimeStateE + 448
	29  dyld     -> https://www.openssl.org/source/openssl-3.1.2.tar.gz
                           0x000000018bec3b14 _ZNK5dyld416JustInTimeLoader15runInitializersERNS_12RuntimeStateE + 36
	30  dyld                                0x000000018bebdb4c _ZNK5dyld46Loader23runInitializersBottomUpERNS_12RuntimeStateERN5dyld35ArrayIPKS0_EE + 220
	31  dyld                                0x000000018bec1654 _ZZNK5dyld46Loader38runInitializersBottomUpPlusUpwardLinksERNS_12RuntimeStateEENK3$_1clEv + 112
	32  dyld                                0x000000018bebdccc _ZNK5dyld46Loader38runInitializersBottomUpPlusUpwardLinksERNS_12RuntimeStateE + 304
	33  dyld                                0x000000018bee2ad4 _ZN5dyld44APIs25runAllInitializersForMainEv + 464
	34  dyld                                0x000000018bea5f34 _ZN5dyld4L7prepareERNS_4APIsEPKN5dyld313MachOAnalyzerE + 3192
	35  dyld                                0x000000018bea4f44 start + 1948
)
libc++abi: terminating due to uncaught exception of type NSException
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString stringByStandardizingPath]: unrecognized selector sent to instance 0x6000034d40c0'
*** First throw call stack:
(
	0   CoreFoundation                      0x000000018c3708c0 __exceptionPreprocess + 176
	1   libobjc.A.dylib                     0x000000018be69eb4 objc_exception_throw + 60
	2   CoreFoundation                      0x000000018c4223dc -[NSObject(NSObject) __retain_OA] + 0
	3   CoreFoundation                      0x000000018c2da9e4 ___forwarding___ + 1572
	4   CoreFoundation                      0x000000018c2da300 _CF_forwarding_prep_0 + 96
	5   Foundation                          0x000000018d3af4f0 -[NSProcessInfo arguments] + 188
	6   CoreFoundation                      0x000000018c3ebff8 __getDefaultArguments_block_invoke + 96
	7   libdispatch.dylib                   0x000000018c071910 _dispatch_client_callout + 20
	8   libdispatch.dylib                   0x000000018c07314c _dispatch_once_callout + 32
	9   CoreFoundation                      0x000000018c3eb994 _addBackstopValuesForIdentifierAndSource + 640
	10  CoreFoundation                      0x000000018c2a6254 __81-[_CFXPreferences(SourceAdditions) withNamedVolatileSourceForIdentifier:perform:]_block_invoke + 144
	11  CoreFoundation                      0x000000018c3eb63c -[_CFXPreferences withNamedVolatileSourceForIdentifier:perform:] + 272
	12  CoreFoundation                      0x000000018c2ac5c4 -[CFPrefsSearchListSource addNamedVolatileSourceForIdentifier:] + 136
	13  CoreFoundation                      0x000000018c42a8bc __108-[_CFXPreferences(SearchListAdditions) withSearchListForIdentifier:container:cloudConfigurationURL:perform:]_block_invoke.155 + 296
	14  CoreFoundation                      0x000000018c42a564 -[_CFXPreferences withSearchLists:] + 84
	15  CoreFoundation                      0x000000018c2a7b18 __108-[_CFXPreferences(SearchListAdditions) withSearchListForIdentifier:container:cloudConfigurationURL:perform:]_block_invoke + 300
	16  CoreFoundation                      0x000000018c42a710 -[_CFXPreferences withSearchListForIdentifier:container:cloudConfigurationURL:perform:] + 384
	17  CoreFoundation                      0x000000018c2a7440 -[_CFXPreferences copyAppValueForKey:identifier:container:configurationURL:] + 156
	18  CoreFoundation                      0x000000018c2a7368 _CFPreferencesCopyAppValueWithContainerAndConfiguration + 112
	19  libintl.8.dylib                     0x0000000102df6574 _libintl_locale_name_default + 72
	20  libintl.8.dylib                     0x0000000102df3f88 libintl_dcigettext + 1892
	21  aria2c                              0x00000001026a62dc _GLOBAL__sub_I_UnknownOptionException.cc + 20
	22  dyld                                0x000000018bec15c8 ___ZZNK5dyld46Loader25findAndRunAllInitializersERNS_12RuntimeStateEENK3$_0clEv_block_invoke + 168
	23  dyld                                0x000000018bf06920 ___ZNK5dyld313MachOAnalyzer18forEachInitializerER11DiagnosticsRKNS0_15VMAddrConverterEU13block_pointerFvjEPKv_block_invoke.209 + 340
	24  dyld                                0x000000018bef9c60 ___ZNK5dyld39MachOFile14forEachSectionEU13block_pointerFvRKNS0_11SectionInfoEbRbE_block_invoke + 496
	25  dyld                                0x000000018bea12fc _ZNK5dyld39MachOFile18forEachLoadCommandER11DiagnosticsU13block_pointerFvPK12load_commandRbE + 300
	26  dyld                                0x000000018bef8c98 _ZNK5dyld39MachOFile14forEachSectionEU13block_pointerFvRKNS0_11SectionInfoEbRbE + 192
	27  dyld                                0x000000018bf06434 _ZNK5dyld313MachOAnalyzer18forEachInitializerER11DiagnosticsRKNS0_15VMAddrConverterEU13block_pointerFvjEPKv + 516
	28  dyld                                0x000000018bebd798 _ZNK5dyld46Loader25findAndRunAllInitializersERNS_12RuntimeStateE + 448
	29  dyld                                0x000000018bec3b14 _ZNK5dyld416JustInTimeLoader15runInitializersERNS_12RuntimeStateE + 36
	30  dyld                                0x000000018bebdb4c _ZNK5dyld46Loader23runInitializersBottomUpERNS_12RuntimeStateERN5dyld35ArrayIPKS0_EE + 220
	31  dyld                                0x000000018bec1654 _ZZNK5dyld46Loader38runInitializersBottomUpPlusUpwardLinksERNS_12RuntimeStateEENK3$_1clEv + 112
	32  dyld                                0x000000018bebdccc _ZNK5dyld46Loader38runInitializersBottomUpPlusUpwardLinksERNS_12RuntimeStateE + 304
	33  dyld                                0x000000018bee2ad4 _ZN5dyld44APIs25runAllInitializersForMainEv + 464
	34  dyld                                0x000000018bea5f34 _ZN5dyld4L7prepareERNS_4APIsEPKN5dyld313MachOAnalyzerE + 3192
	35  dyld                                0x000000018bea4f44 start + 1948
)
libc++abi: terminating due to uncaught exception of type NSException
/opt/homebrew/bin/ruby-build: line 333: 91224 Abort trap: 6           aria2c --allow-overwrite=true --no-conf=true -o "${out}" ${ARIA2_OPTS} "$1" 1>&4
error: failed to download openssl-3.1.2.tar.gz

BUILD FAILED (macOS 14.0 using ruby-build 20230919)

from ruby-build.

mislav avatar mislav commented on July 30, 2024

@thomasuster If you managed to get further in Ruby compilation since your last report, please share. Since this isn't a bug with ruby-build, I will be inclined to close this issue soon.

from ruby-build.

thomasuster avatar thomasuster commented on July 30, 2024

I appreciate everyone responses, I wasn't able to fix this issue, but let's go ahead and close it.

from ruby-build.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.