[R-SIG-Mac]Re: ggobi and Mac OS X

Jan de Leeuw deleeuw at stat.ucla.edu
Wed Mar 19 12:16:22 MET 2003


There is no malloc.h in OS X. All the defs are in stdlib.h. If you want  
to
you could make a softlink /usr/local/inlcude/malloc.h to   
/usr/include/stdlib.h,
or even make a dummy empty malloc.h.

On Wednesday, Mar 19, 2003, at 11:33 US/Pacific, Dennis A. Wolf wrote:

> I looked around in the Makeconf file in R and found
>
> SHLIB_LDFLAGS= -bundle -flat_namespace -undefined suppress
>
> I edited the Makeconf that was created when ggobi was configured and  
> replaced -shared with the above. The error I got was
>
>  tour_pp.c:31: header file 'malloc.h' not found
>
> Does this have anything to do with the revised flags? Any suggestions  
> on how to proceed?
>
> Thanks!
>
> Dennis A. Wolf, Ph.D.
> Computer Sciences and Mathematics Division
> Oak Ridge National Laboratory
> POB 2008, Building 6011, MS 6418
> Oak Ridge, TN  37831-6418
>
> phone: (865) 574-6326
> fax:   (865) 576-3513
> email: wolfda at ornl.gov
>
> The full details from configure and make are:
> qedmac 1106> sudo ./configure --with-xml --with-R --enable-embed
> loading cache ./config.cache
> checking for gtk-config... (cached) /sw/bin/gtk-config
> Setting gtk flags
> checking for uname... (cached) /usr/bin/uname
> checking for install... (cached) /usr/bin/install
> checking for gcc... (cached) gcc
> checking whether the C compiler (gcc  ) works... yes
> checking whether the C compiler (gcc  ) is a cross-compiler... no
> checking whether we are using GNU C... (cached) yes
> checking whether gcc accepts -g... (cached) yes
> Checking flag for linking shared libraries
> SHLIB linker flags: -shared
> with_xml: yes
> checking for xml2-config... (cached) /sw/bin/xml2-config
> Have xml-config: /sw/bin/xml2-config
> USE_XML := USE_XML=2
> XML Version := 2
> checking for R... (cached) /usr/local/bin/R
> checking for uname... (cached) /usr/bin/uname
> creating ./config.status
> creating Makeconf
> creating GNUmakefile
> creating src/GNUmakefile
> creating gtkext/src/GNUmakefile
> creating bin/setLD.csh
> creating bin/setLD.bsh
> creating bin/ggobi
> creating bin/ggobi-config
> creating bugTemplate
> creating share/ggobirc
> creating local.config
> creating share/tools/plugin
> creating src/config.h
> src/config.h is unchanged
> Installation directory: /usr/local
> qedmac 1107> sudo vi Makeconf
> qedmac 1108> sudo make
> make -C src ../bin/ggobi.bin
> gcc -I../include -I../gtkext/include -I/sw/include/gtk-1.2  
> -I/sw/include/glib-1.2 -I/sw/lib/glib/include -I/usr/X11R6/include   
> -I/sw/include/libxml2  -I/sw/include -DUSE_XML=2 -DSUPPORT_PLUGINS=1  
> -DSUPPORT_INIT_FILES=1 -DHAVE_CONFIG_H  -c tour_pp.c -o tour_pp.o
> tour_pp.c:31: header file 'malloc.h' not found
> cpp-precomp: warning: errors during smart preprocessing, retrying in  
> basic mode
> make[1]: *** [tour_pp.o] Error 1
> make: *** [bin/ggobi.bin] Error 2
>
>
> On Wednesday, Mar 19, 2003, at 06:01 US/Eastern,  
> r-sig-mac-request at stat.math.ethz.ch wrote:
>> Date: Tue, 18 Mar 2003 10:27:01 -0800
>> From: Jan de Leeuw <deleeuw at stat.ucla.edu>
>> Subject: Re: [R-SIG-Mac]ggobi and Mac OS X
>> To: "Dennis A. Wolf" <wolfda at ornl.gov>
>> Cc: r-sig-mac at stat.math.ethz.ch
>> Message-ID: <35DD2522-596F-11D7-91B1-000393860F3C at stat.ucla.edu>
>> Content-Type: text/plain; charset=US-ASCII; format=flowed
>>
>> In MacOS X you can build either dynamic libraries (foo.dylib), which  
>> are
>> to be linked against, or bundles (foo.so) which are to be loaded at  
>> run
>> time (plugins, packages). Most ELF based systems dont distinguish the
>> two.
>>
>> So in R, for instance, you make libR.dylib and R_gnome.so or tcltk.so.
>> For dylibs you need the flag -dynamiclib, for bundles you need -bundle
>> (but more, because you need to tell the linker what to do about
>> undefined
>> symbols). See the configure files for R for more details.
>>
>> I'll look at ggobi, which I have running, but I am not sure what I
>> needed
>> to do.
>>
>> On Tuesday, March 18, 2003, at 08:35 AM, Dennis A. Wolf wrote:
>>
>>> Greetings:
>>>
>>> I have been trying to install ggobi with the ultimate goal of using  
>>> it
>>> within R. I am having difficulty which appears to be related to gcc
>>> not allowing -shared as an option with Mac OS X. Can anyone suggest
>>> how I can overcome this problem?
>>>
>>> I am using a 15" flat-panel iMac, Mac OSX 10.2.4, Apple's X11 beta 3.
>>>
>>> The gory details of the attempted installation follow:
>>>
>>> I downloaded ggobi, ggobi_0.99-10.tar.gz and gunzipped and tarred it
>>> as su to get the directory /usr/local/lib/ggobi and within that
>>> directory I did
>>>
>>> sudo ./configure --with-xml --enable-embed
>>>
>>> and got:
>>>
>>> loading cache ./config.cache
>>> checking for gtk-config... (cached) /sw/bin/gtk-config
>>> Setting gtk flags
>>> checking for uname... (cached) /usr/bin/uname
>>> checking for install... (cached) /usr/bin/install
>>> checking for gcc... (cached) gcc
>>> checking whether the C compiler (gcc  ) works... yes
>>> checking whether the C compiler (gcc  ) is a cross-compiler... no
>>> checking whether we are using GNU C... (cached) yes
>>> checking whether gcc accepts -g... (cached) yes
>>> Checking flag for linking shared libraries
>>> SHLIB linker flags: -shared
>>> with_xml: yes
>>> checking for xml2-config... (cached) /sw/bin/xml2-config
>>> Have xml-config: /sw/bin/xml2-config
>>> USE_XML := USE_XML=2
>>> XML Version := 2
>>> checking for uname... (cached) /usr/bin/uname
>>> creating ./config.status
>>> creating Makeconf
>>> creating GNUmakefile
>>> creating src/GNUmakefile
>>> creating gtkext/src/GNUmakefile
>>> creating bin/setLD.csh
>>> creating bin/setLD.bsh
>>> creating bin/ggobi
>>> creating bin/ggobi-config
>>> creating bugTemplate
>>> creating share/ggobirc
>>> creating local.config
>>> creating share/tools/plugin
>>> creating src/config.h
>>> src/config.h is unchanged
>>> Installation directory: /usr/local
>>>
>>> Now when I
>>>
>>> sudo make
>>>
>>> I got
>>>
>>> make -C gtkext/src install
>>> gcc -shared -o libgtkext.so cokus.lo mt19937ar.lo gtkextruler.lo
>>> gtkexthruler.lo gtkextvruler.lo
>>> gcc: unrecognized option `-shared'
>>> ld: Undefined symbols:
>>> _main
>>> _g_log
>>> _gdk_draw_pixmap
>>> _gdk_gc_destroy
>>> _gdk_gc_new
>>> _gdk_gc_set_exposures
>>> _gdk_pixmap_new
>>> _gdk_pixmap_unref
>>> _gdk_window_get_size
>>> _gdk_window_move_resize
>>> _gdk_window_new
>>> _gdk_window_set_user_data
>>> _gtk_marshal_NONE__NONE
>>> _gtk_object_class_add_signals
>>> _gtk_signal_new
>>> _gtk_style_attach
>>> _gtk_style_set_background
>>> _gtk_type_check_class_cast
>>> _gtk_type_check_object_cast
>>> _gtk_type_class
>>> _gtk_type_is_a
>>> _gtk_type_unique
>>> _gtk_widget_get_colormap
>>> _gtk_widget_get_events
>>> _gtk_widget_get_parent_window
>>> _gtk_widget_get_type
>>> _gtk_widget_get_visual
>>> _gtk_widget_queue_draw
>>> _gtk_widget_set_state
>>> _myrint
>>> _gdk_draw_line
>>> _gdk_draw_string
>>> _gdk_pointer_grab
>>> _gdk_pointer_ungrab
>>> _gdk_window_get_pointer
>>> _gtk_paint_box
>>> _gtk_signal_emit_by_name
>>> _gtk_type_new
>>> make[1]: *** [libgtkext.so] Error 1
>>> make: *** [lib/libgtkext.so] Error 2
>>>
>>> It appears that gcc does not like the -shared option. And indeed in
>>> the help file for gcc it says that this option is not allowed for Mac
>>> OS X.
>>>
>>> _______________________________________________
>>> R-SIG-Mac mailing list
>>> R-SIG-Mac at stat.math.ethz.ch
>>> https://www.stat.math.ethz.ch/mailman/listinfo/r-sig-mac
>>>
>>>
>
> _______________________________________________
> R-SIG-Mac mailing list
> R-SIG-Mac at stat.math.ethz.ch
> https://www.stat.math.ethz.ch/mailman/listinfo/r-sig-mac
>
>
===
Jan de Leeuw; Professor and Chair, UCLA Department of Statistics;
Editor: Journal of Multivariate Analysis, Journal of Statistical  
Software
US mail: 9432 Boelter Hall, Box 951554, Los Angeles, CA 90095-1554
phone (310)-825-9550;  fax (310)-206-5658;  email: deleeuw at stat.ucla.edu
homepage: http://gifi.stat.ucla.edu
   
------------------------------------------------------------------------ 
-------------------------
           No matter where you go, there you are. --- Buckaroo Banzai
                    http://gifi.stat.ucla.edu/sounds/nomatter.au
   
------------------------------------------------------------------------ 
-------------------------



More information about the R-SIG-Mac mailing list