List Info

Thread: Building on OS X and gcc 4.0




Building on OS X and gcc 4.0
user name
2007-08-08 18:51:04
Hi there,

I'm struggling to build P4Ruby with gcc 4.0 on OS X. Here is
what I do:

~/Desktop/P4Ruby-1.5953 aslakhellesoy$
/usr/local/ruby-1.8.6/bin/ruby
p4conf.rb --apidir ../p4api-2007.2.122958 --gccver 4

Starting to configure P4/Ruby for building


P4/Ruby Configuration Summary
-----------------------------

Using Perforce API Version: 2007.2
API headers and libs from :
/Users/aslakhellesoy/Desktop/p4api-2007.2.122958
OS name                   : DARWIN
OS version                : 8
Platform                  : X86
CFLAGS                    : -g -O2 -pipe -fno-common
-I/Users/aslakhellesoy/Desktop/p4api-2007.2.122958/include/p
4
-DOS_DARWIN -DOS_DARWIN8 -DOS_DARWIN8X86 -DCASE_INSENSITIVE
-Dconst_char="const char"
LIBPATH                   :
/Users/aslakhellesoy/Desktop/p4api-2007.2.122958/lib
libs                      : -lclient -lrpc -lsupp

Creating extconf.h
creating Makefile


When I run Make I get the following error:

g++ -I.
-I/usr/local/ruby-1.8.6/lib/ruby/1.8/i686-darwin8.10.1
-I/usr/local/ruby-1.8.6/lib/ruby/1.8/i686-darwin8.10.1 -I.
-fno-common -g -O2 -pipe -fno-common
-I/Users/aslakhellesoy/Desktop/p4api-2007.2.122958/include/p
4
-DOS_DARWIN -DOS_DARWIN8 -DOS_DARWIN8X86 -DCASE_INSENSITIVE
-Dconst_char="const char"    -c
clientuserruby.cpp
g++ -I.
-I/usr/local/ruby-1.8.6/lib/ruby/1.8/i686-darwin8.10.1
-I/usr/local/ruby-1.8.6/lib/ruby/1.8/i686-darwin8.10.1 -I.
-fno-common -g -O2 -pipe -fno-common
-I/Users/aslakhellesoy/Desktop/p4api-2007.2.122958/include/p
4
-DOS_DARWIN -DOS_DARWIN8 -DOS_DARWIN8X86 -DCASE_INSENSITIVE
-Dconst_char="const char"    -c p4.cpp
g++ -I.
-I/usr/local/ruby-1.8.6/lib/ruby/1.8/i686-darwin8.10.1
-I/usr/local/ruby-1.8.6/lib/ruby/1.8/i686-darwin8.10.1 -I.
-fno-common -g -O2 -pipe -fno-common
-I/Users/aslakhellesoy/Desktop/p4api-2007.2.122958/include/p
4
-DOS_DARWIN -DOS_DARWIN8 -DOS_DARWIN8X86 -DCASE_INSENSITIVE
-Dconst_char="const char"    -c p4clientapi.cpp
g++ -I.
-I/usr/local/ruby-1.8.6/lib/ruby/1.8/i686-darwin8.10.1
-I/usr/local/ruby-1.8.6/lib/ruby/1.8/i686-darwin8.10.1 -I.
-fno-common -g -O2 -pipe -fno-common
-I/Users/aslakhellesoy/Desktop/p4api-2007.2.122958/include/p
4
-DOS_DARWIN -DOS_DARWIN8 -DOS_DARWIN8X86 -DCASE_INSENSITIVE
-Dconst_char="const char"    -c p4mergedata.cpp
g++ -I.
-I/usr/local/ruby-1.8.6/lib/ruby/1.8/i686-darwin8.10.1
-I/usr/local/ruby-1.8.6/lib/ruby/1.8/i686-darwin8.10.1 -I.
-fno-common -g -O2 -pipe -fno-common
-I/Users/aslakhellesoy/Desktop/p4api-2007.2.122958/include/p
4
-DOS_DARWIN -DOS_DARWIN8 -DOS_DARWIN8X86 -DCASE_INSENSITIVE
-Dconst_char="const char"    -c p4result.cpp
g++ -I.
-I/usr/local/ruby-1.8.6/lib/ruby/1.8/i686-darwin8.10.1
-I/usr/local/ruby-1.8.6/lib/ruby/1.8/i686-darwin8.10.1 -I.
-fno-common -g -O2 -pipe -fno-common
-I/Users/aslakhellesoy/Desktop/p4api-2007.2.122958/include/p
4
-DOS_DARWIN -DOS_DARWIN8 -DOS_DARWIN8X86 -DCASE_INSENSITIVE
-Dconst_char="const char"    -c specmgr.cpp
g++ -bundle -framework Carbon  
-L"/usr/local/ruby-1.8.6/lib"
-L"/Users/aslakhellesoy/Desktop/p4api-2007.2.122958/lib
" -o P4.bundle
clientuserruby.o p4.o p4clientapi.o p4mergedata.o p4result.o
specmgr.o
 -lclient -lrpc -lsupp  -ldl -lobjc
/usr/bin/ld: Undefined symbols:
_rb_ary_shift
_rb_block_given_p
_rb_cArray
_rb_cHash
_rb_cObject
_rb_const_get_at
_rb_funcall
_rb_gc_mark
_rb_intern
_rb_obj_is_kind_of
_rb_protect
_rb_str2cstr
_rb_str_new
_rb_warn
_rb_yield
_rb_ary_entry
_rb_check_type
_rb_data_object_alloc
_rb_define_class
_rb_define_class_under
_rb_define_const
_rb_define_method
_rb_define_singleton_method
_rb_eRuntimeError
_rb_int2inum
_rb_num2long
_rb_obj_call_init
_rb_raise
_rb_str_new2
_rb_ary_new
_rb_ary_push
_rb_thread_schedule
_rb_ary_store
_rb_hash_aref
_rb_hash_aset
_rb_hash_new
collect2: ld returned 1 exit status
make: *** [P4.bundle] Error 1


I've tried to switch to gcc 3.3, but that just dies on me (I
don't
think I have it properly installed).
I'm on a MacBook with OS X 10.4.10

Any idea what I might be doing wrong? Do I *really* need gcc
3 to build P4Ruby?

Cheers,
Aslak
_______________________________________________
p4ruby mailing list
p4rubyperforce.com

http://maillist.perforce.com/mailman/listinfo/p4ruby

Re: Building on OS X and gcc 4.0
country flaguser name
United Kingdom
2007-08-09 10:44:49
Hi Aslak,

Looks like it isn't linking in the Ruby libraries for some
reason. Try 
adding '-lruby1.8' to the link line (manually), so it looks
like this:

g++ -bundle -framework 
Carbon   -L"/usr/local/ruby-1.8.6/lib"
-L"/Users/aslakhellesoy/Desktop/p4api-2007.2.122958/lib
" -o 
P4.bundle clientuserruby.o p4.o p4clientapi.o p4mergedata.o
p4result.o 
specmgr.o -lruby1.8 -lclient -lrpc -lsupp  -ldl -lobjc

Normally ruby would automatically link extensions with
-lruby1.8 (since 
obviously all extensions will need it), so I don't know
offhand why it missed 
it out.

Tony

On Thursday 09 August 2007 00:51, aslak hellesoy wrote:
> Hi there,
>
> I'm struggling to build P4Ruby with gcc 4.0 on OS X.
Here is what I do:
>
> ~/Desktop/P4Ruby-1.5953 aslakhellesoy$
/usr/local/ruby-1.8.6/bin/ruby
> p4conf.rb --apidir ../p4api-2007.2.122958 --gccver 4
>
> Starting to configure P4/Ruby for building
>
>
> P4/Ruby Configuration Summary
> -----------------------------
>
> Using Perforce API Version: 2007.2
> API headers and libs from :
> /Users/aslakhellesoy/Desktop/p4api-2007.2.122958 OS
name                  
> : DARWIN
> OS version                : 8
> Platform                  : X86
> CFLAGS                    : -g -O2 -pipe -fno-common
>
-I/Users/aslakhellesoy/Desktop/p4api-2007.2.122958/include/p
4
> -DOS_DARWIN -DOS_DARWIN8 -DOS_DARWIN8X86
-DCASE_INSENSITIVE
> -Dconst_char="const char"
> LIBPATH                   :
> /Users/aslakhellesoy/Desktop/p4api-2007.2.122958/lib
libs                  
>    : -lclient -lrpc -lsupp
>
> Creating extconf.h
> creating Makefile
>
>
> When I run Make I get the following error:
>
> g++ -I.
-I/usr/local/ruby-1.8.6/lib/ruby/1.8/i686-darwin8.10.1
> -I/usr/local/ruby-1.8.6/lib/ruby/1.8/i686-darwin8.10.1
-I.
> -fno-common -g -O2 -pipe -fno-common
>
-I/Users/aslakhellesoy/Desktop/p4api-2007.2.122958/include/p
4
> -DOS_DARWIN -DOS_DARWIN8 -DOS_DARWIN8X86
-DCASE_INSENSITIVE
> -Dconst_char="const char"    -c
clientuserruby.cpp
> g++ -I.
-I/usr/local/ruby-1.8.6/lib/ruby/1.8/i686-darwin8.10.1
> -I/usr/local/ruby-1.8.6/lib/ruby/1.8/i686-darwin8.10.1
-I.
> -fno-common -g -O2 -pipe -fno-common
>
-I/Users/aslakhellesoy/Desktop/p4api-2007.2.122958/include/p
4
> -DOS_DARWIN -DOS_DARWIN8 -DOS_DARWIN8X86
-DCASE_INSENSITIVE
> -Dconst_char="const char"    -c p4.cpp
> g++ -I.
-I/usr/local/ruby-1.8.6/lib/ruby/1.8/i686-darwin8.10.1
> -I/usr/local/ruby-1.8.6/lib/ruby/1.8/i686-darwin8.10.1
-I.
> -fno-common -g -O2 -pipe -fno-common
>
-I/Users/aslakhellesoy/Desktop/p4api-2007.2.122958/include/p
4
> -DOS_DARWIN -DOS_DARWIN8 -DOS_DARWIN8X86
-DCASE_INSENSITIVE
> -Dconst_char="const char"    -c
p4clientapi.cpp
> g++ -I.
-I/usr/local/ruby-1.8.6/lib/ruby/1.8/i686-darwin8.10.1
> -I/usr/local/ruby-1.8.6/lib/ruby/1.8/i686-darwin8.10.1
-I.
> -fno-common -g -O2 -pipe -fno-common
>
-I/Users/aslakhellesoy/Desktop/p4api-2007.2.122958/include/p
4
> -DOS_DARWIN -DOS_DARWIN8 -DOS_DARWIN8X86
-DCASE_INSENSITIVE
> -Dconst_char="const char"    -c
p4mergedata.cpp
> g++ -I.
-I/usr/local/ruby-1.8.6/lib/ruby/1.8/i686-darwin8.10.1
> -I/usr/local/ruby-1.8.6/lib/ruby/1.8/i686-darwin8.10.1
-I.
> -fno-common -g -O2 -pipe -fno-common
>
-I/Users/aslakhellesoy/Desktop/p4api-2007.2.122958/include/p
4
> -DOS_DARWIN -DOS_DARWIN8 -DOS_DARWIN8X86
-DCASE_INSENSITIVE
> -Dconst_char="const char"    -c p4result.cpp
> g++ -I.
-I/usr/local/ruby-1.8.6/lib/ruby/1.8/i686-darwin8.10.1
> -I/usr/local/ruby-1.8.6/lib/ruby/1.8/i686-darwin8.10.1
-I.
> -fno-common -g -O2 -pipe -fno-common
>
-I/Users/aslakhellesoy/Desktop/p4api-2007.2.122958/include/p
4
> -DOS_DARWIN -DOS_DARWIN8 -DOS_DARWIN8X86
-DCASE_INSENSITIVE
> -Dconst_char="const char"    -c specmgr.cpp
> g++ -bundle -framework Carbon  
-L"/usr/local/ruby-1.8.6/lib"
>
-L"/Users/aslakhellesoy/Desktop/p4api-2007.2.122958/lib
" -o P4.bundle
> clientuserruby.o p4.o p4clientapi.o p4mergedata.o
p4result.o specmgr.o
>  -lclient -lrpc -lsupp  -ldl -lobjc
> /usr/bin/ld: Undefined symbols:
> _rb_ary_shift
> _rb_block_given_p
> _rb_cArray
> _rb_cHash
> _rb_cObject
> _rb_const_get_at
> _rb_funcall
> _rb_gc_mark
> _rb_intern
> _rb_obj_is_kind_of
> _rb_protect
> _rb_str2cstr
> _rb_str_new
> _rb_warn
> _rb_yield
> _rb_ary_entry
> _rb_check_type
> _rb_data_object_alloc
> _rb_define_class
> _rb_define_class_under
> _rb_define_const
> _rb_define_method
> _rb_define_singleton_method
> _rb_eRuntimeError
> _rb_int2inum
> _rb_num2long
> _rb_obj_call_init
> _rb_raise
> _rb_str_new2
> _rb_ary_new
> _rb_ary_push
> _rb_thread_schedule
> _rb_ary_store
> _rb_hash_aref
> _rb_hash_aset
> _rb_hash_new
> collect2: ld returned 1 exit status
> make: *** [P4.bundle] Error 1
>
>
> I've tried to switch to gcc 3.3, but that just dies on
me (I don't
> think I have it properly installed).
> I'm on a MacBook with OS X 10.4.10
>
> Any idea what I might be doing wrong? Do I *really*
need gcc 3 to build
> P4Ruby?
>
> Cheers,
> Aslak
> _______________________________________________
> p4ruby mailing list
> p4rubyperforce.com
> 
http://maillist.perforce.com/mailman/listinfo/p4ruby
>
> !DSPAM:46ba5ded302241577214869!
_______________________________________________
p4ruby mailing list
p4rubyperforce.com

http://maillist.perforce.com/mailman/listinfo/p4ruby

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )