Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#17547 closed defect (fixed)

ruby fails to build universal

Reported by: jeremyhu (Jeremy Huddleston Sequoia) Owned by: kimuraw (kimura wataru)
Priority: Normal Milestone:
Component: ports Version: 1.6.0
Keywords: universal Cc: kimuraw (kimura wataru)
Port: ruby

Description

d warning: in ../../libruby.dylib, file is not of required architecture
making ruby
/usr/bin/gcc-4.0  -O2 -isysroot /Developer/SDKs/MacOSX10.5.Internal.sdk -arch ppc -arch i386 -mmacosx-version-min=10.5  -fno-common -pipe -fno-common    -DRUBY_EXPORT  -L. -L/opt/local/lib -arch ppc -arch i386 -mmacosx-version-min=10.5  main.o  -lruby -lpthread -ldl -lobjc   -o ruby
ld warning: in ./libruby.dylib, file is not of required architecture
Undefined symbols for architecture ppc:
  "_ruby_options", referenced from:
      _main in main.o
  "_ruby_run", referenced from:
      _main in main.o
  "_ruby_init", referenced from:
      _main in main.o
  "_ruby_init_stack", referenced from:
      _main in main.o
ld: symbol(s) not found for architecture ppc
collect2: ld returned 1 exit status
lipo: can't open input file: /var/tmp//cclPvkBp.out (No such file or directory)
make[1]: *** [ruby] Error 1
make: *** [all] Error 2

Change History (3)

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

Index: Portfile
===================================================================
--- Portfile	(revision 42954)
+++ Portfile	(working copy)
@@ -27,6 +27,8 @@
 
 platforms		darwin
 
+depends_build		port:autoconf
+
 depends_lib		port:libiconv \
 				port:readline \
 				port:openssl \
@@ -52,12 +54,14 @@
 patchfiles-append patch-node.h.diff
 
 use_autoconf			yes
+autoconf.cmd autoreconf
+autoconf.args -fvi
+
 use_parallel_build      yes
 
 configure.args	--enable-shared \
 				--mandir="${prefix}/share/man" \
 				--enable-pthread \
-				--without-tk \
 				--with-vendordir=${prefix}/lib/ruby/vendor_ruby
 # ignore minor version for archdir, like i686-darwin9
 configure.env	UNAME_RELEASE=${os.major}
@@ -78,6 +82,11 @@
 	}
 }
 
+variant universal {
+	configure.args-delete --disable-dependency-tracking
+	build.target-append  EXTLDFLAGS="${configure.universal_ldflags}" CFLAGS="${configure.universal_cflags}"	
+}
+
 platform darwin {
 	# for proper rdoc/ri creation, make sure to link to destroot libruby.dylib
 	destroot.env	DYLD_LIBRARY_PATH=${destroot}${prefix}/lib
@@ -86,22 +95,8 @@
 platform darwin 7 {
 	# pthreads is being called with an unavailable function call
 	configure.args-delete	--enable-pthread
-	# /usr/bin/autoconf is too old to regenerate configure, requires >= 2.58
-	depends_build	port:autoconf
 }
 
-variant tk conflicts mactk description "enable tk support" {
-	configure.args-delete	--without-tk
-	configure.args-append	--with-tk
-	depends_lib-append		port:tcl \
-							port:tk
-}
-
-variant mactk conflicts tk description "enable MacTk (Tk.framework without X11) support" {
-	configure.args-delete   --without-tk
-	configure.args-append   --enable-tcltk-framework
-}
-
 variant thread_hooks description "apply Apple's thread_hooks patch" {
 	patchfiles-append		patch-thread-hooks
 }

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

Resolution: fixed
Status: newclosed

comment:3 Changed 15 years ago by (none)

Milestone: Port Bugs

Milestone Port Bugs deleted

Note: See TracTickets for help on using tickets.