Opened 23 months ago

Last modified 22 months ago

#65290 assigned defect

ruby31 @3.1.2 Error: Undefined symbols for architecture x86_64:

Reported by: cave-canem Owned by: kimuraw (kimura wataru)
Priority: Normal Milestone:
Component: ports Version: 2.7.2
Keywords: Mavericks Cc: cave-canem, mascguy (Christopher Nielsen)
Port: ruby31

Description

sudo port -vd install ruby31 +doc +gmp +jemalloc
...
compiling enc/trans/newline.c
compiling version.c
linking miniruby
Undefined symbols for architecture x86_64:
  "_SecRandomCopyBytes", referenced from:
      _ruby_fill_random_bytes in random.o
      _Init_RandomSeedCore in random.o
      _fill_random_seed in random.o
      _random_raw_seed in random.o
  "_kSecRandomDefault", referenced from:
      _ruby_fill_random_bytes in random.o
      _Init_RandomSeedCore in random.o
      _fill_random_seed in random.o
      _random_raw_seed in random.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [miniruby] Error 1
make: Leaving directory `/opt/MacPorts/var/macports/build/_opt_macports-ports_lang_ruby31/ruby31/work/ruby-3.1.2'
Command failed:  cd "/opt/MacPorts/var/macports/build/_opt_macports-ports_lang_ruby31/ruby31/work/ruby-3.1.2" && /usr/bin/make -j4 -w all
Exit code: 2
Error: Failed to build ruby31: command execution failed
DEBUG: Error code: CHILDSTATUS 79900 2
DEBUG: Backtrace: command execution failed
    while executing
"system {*}$notty {*}$callback {*}$nice $fullcmdstring"
    invoked from within
"command_exec -callback portprogress::target_progress_callback build"
    (procedure "portbuild::build_main" line 8)
    invoked from within
"$procedure $targetname"
Error: See /opt/MacPorts/var/macports/logs/_opt_macports-ports_lang_ruby31/ruby31/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug.
Error: Processing of port ruby31 failed

See the detailed log in the attachment

Attachments (1)

main.log.tar.xz (13.2 KB) - added by cave-canem 23 months ago.
main.log

Download all attachments as: .zip

Change History (4)

Changed 23 months ago by cave-canem

Attachment: main.log.tar.xz added

main.log

comment:1 Changed 22 months ago by kimura wataru <kimuraw@…>

In 477af2eda93223aa520992f32757f865ea20c49e/macports-ports (master):

lang/ruby31: fix missing linker flag "-framework Security" for 10.7 .. 10.9

refs: #65290

[note] other problem looks remain on 10.8 and 10.9.

generating ext/-test-/RUBY_ALIGNOF/Makefile overwrites topdir's Makefile.

  • fix detecting macOS version in configure and dln.c
    • AvailabirityMacros.h does not contains macros future versions. for example, "MAC_OS_X_VERSION_10_10" does not defined in 10.9's headerfile.
  • fix dsymutil error at build phase when using macports-clang-* as configure.compiler. but this error might not affect build result.

`
$ sw_vers -productVersion
10.9.5
$ uname -r
13.4.0
$ cat conftest.c
/* end confdefs.h. */

#include <AvailabilityMacros.h>

int
main ()
{
static int test_array [1 - 2 * !(MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_7 &&

MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_10)];

test_array [0] = 0;
return test_array [0];

;
return 0;

}
$ cc -c conftest.c
conftest.c:8:50: error: use of undeclared identifier 'MAC_OS_X_VERSION_10_10'

MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_10)];


1 error generated.
`

comment:2 Changed 22 months ago by mascguy (Christopher Nielsen)

Cc: mascguy added

comment:3 Changed 22 months ago by mascguy (Christopher Nielsen)

Cc: kimuraw removed
Owner: set to kimuraw
Status: newassigned
Note: See TracTickets for help on using tickets.