Opened 15 years ago

Closed 14 years ago

#22866 closed defect (fixed)

ruby19 no longer +universal (LDFLAGS ignored)

Reported by: jeremyhu (Jeremy Huddleston Sequoia) Owned by: kimuraw (kimura wataru)
Priority: Normal Milestone:
Component: ports Version: 1.8.1
Keywords: universal Cc: brett@…
Port: ruby19

Description

/usr/bin/gcc-4.2 -ggdb3 -arch x86_64 -arch i386 -O2 -g -Wall -Wno-parentheses  -fno-common -pipe -fno-common  -L. -L/opt/local/lib -arch x86_64 -arch i386 -L/usr/local/lib   main.o  -lruby1.9 -lpthread -ldl -lobjc   -o ruby1.9
ld: warning: in ./libruby1.9.dylib, file is not of required architecture
Undefined symbols for architecture i386:
 "_ruby_options", referenced from:
     _main in main.o
 "_ruby_sysinit", referenced from:
     _main in main.o
 "_ruby_init_stack", referenced from:
     _main in main.o
 "_ruby_run_node", referenced from:
     _main in main.o
 "_ruby_init", referenced from:
     _main in main.o
ld: symbol(s) not found for architecture i386


And looking through the build log, sure enough the arch flags were dropped:

:info:build cc -dynamiclib -undefined suppress -flat_namespace -install_name /opt/local/lib/libruby1.9.dylib -current_version 1.9.1 -compatibility_version 1.9.1   dln.
o encoding.o array.o bignum.o class.o compar.o complex.o dir.o enum.o enumerator.o error.o eval.o load.o proc.o file.o gc.o hash.o inits.o io.o marshal.o math.o numeric.o object.o pack.o parse.o process.o random.o range.o rational.o re.o regcomp.o regenc.o regerror.o regexec.o regparse.o regsyntax.o ruby.o safe.o signal.o sprintf.o 
st.o strftime.o string.o struct.o time.o transcode.o util.o variable.o version.o compile.o debug.o iseq.o vm.o vm_dump.o thread.o cont.o ascii.o us_ascii.o unicode.o utf_8.o newline.o  prelude.o dmyext.o  -o libruby1.9.1.9.1.dylib

Attachments (1)

ruby19_with_patch.log (108.3 KB) - added by jeremyhu (Jeremy Huddleston Sequoia) 15 years ago.
build log with the suggested changes

Download all attachments as: .zip

Change History (8)

comment:1 Changed 15 years ago by nobu@…

use --with-arch=x86_64,i386 option.

Changed 15 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Attachment: ruby19_with_patch.log added

build log with the suggested changes

comment:2 Changed 15 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Nope, that is not sufficient. I tried that:

Index: Portfile
===================================================================
--- Portfile	(revision 62470)
+++ Portfile	(working copy)
@@ -90,6 +90,18 @@
         configure.args-append   --enable-tcltk-framework
 }
 
+pre-configure {
+    set arch_list ""
+    if {[variant_isset universal]} {
+        foreach arch ${universal_archs} {
+            set arch_list "${arch_list},${arch}"
+        }
+    } else {
+        set arch_list "${configure.build_arch}"
+    }
+    configure.args-append --with-arch=${arch_list}
+}
+
 livecheck.type  regex
 livecheck.url   http://ftp.ruby-lang.org/pub/ruby/1.9/
 livecheck.regex ruby-(${version})${extract.suffix}

The problem persists. See the full log attached.

comment:3 Changed 15 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Note:

:info:configure configure: WARNING: unrecognized options: --disable-dependency-tracking, --without-tk, --with-arch

comment:4 in reply to:  3 Changed 15 years ago by nobu@…

--with-arch option hasn't been backported to 1.9.1, so 1.9.1 doesn't support universal binary. 1.9.2 does.

comment:5 Changed 15 years ago by nobu@…

use ARCH_FLAG='-arch ${arch}' option for each archs.

comment:6 Changed 14 years ago by nerdling (Jeremy Lavergne)

Cc: brett@… added
Owner: changed from brett@… to kimuraw@…

comment:7 Changed 14 years ago by kimuraw (kimura wataru)

Resolution: fixed
Status: newclosed

I fixed this problem at r70988.

port:ruby19 is now 1.9.2 and use "--with-arch" configure option.

Note: See TracTickets for help on using tickets.