Re: undefined symbol _init_mac_osx_environment

Andrew Choi <[email protected]> Sun, 25 Aug 2002 11:23:08 -0600
Newsgroups gmane.emacs.macintosh.devel
Message-ID <[email protected]>
> [...]
> I saw the same error on "./configure --without-carbon --with-x 
> --x-lib=/usr/X11R6/libstatic; make".
> 
> mac.o is not be linked when configured --without-carbon (see 
> Makefile.in:540)
> 
> I think we need not init_mac_osx_environment() nor sys_select()
> on non-carbon environemnt. Am I right?
> 
> How about this patch?
> 
> --- patch begin ---
> Index: src/emacs.c
> ===================================================================
> RCS file: /cvsroot/emacs/emacs/src/emacs.c,v
> retrieving revision 1.314
> diff -u -r1.314 emacs.c
> --- src/emacs.c	24 Aug 2002 03:15:22 -0000	1.314
> +++ src/emacs.c	25 Aug 2002 05:44:28 -0000
> @@ -1363,9 +1363,11 @@
>     init_ntproc ();	/* must precede init_editfns.  */
>   #endif
> 
> +#ifdef HAVE_CARBON
>   #ifdef MAC_OSX
>     if (initialized)
>       init_mac_osx_environment ();
> +#endif
>   #endif
> 
>     /* egetenv is a pretty low-level facility, which may get called in
> Index: src/s/darwin.h
> ===================================================================
> RCS file: /cvsroot/emacs/emacs/src/s/darwin.h,v
> retrieving revision 1.5
> diff -u -r1.5 darwin.h
> --- src/s/darwin.h	11 Aug 2002 00:26:24 -0000	1.5
> +++ src/s/darwin.h	25 Aug 2002 05:44:28 -0000
> @@ -309,9 +309,11 @@
>   #define free unexec_free
>   #endif
> 
> +#ifdef HAVE_CARBON
>   /* Reroute calls to SELECT to the version defined in mac.c to fix the
>      problem of Emacs requiring an extra return to be typed to start
>      working when started from the command line.  */
>   #if defined (emacs) || defined (temacs)
>   #define select sys_select
> +#endif
>   #endif
> --- patch end   ---

Hi Nozomu,

Thank you for the patch.  Calling init_mac_osx_environment allows
Emacs support files (like Lisp files) to be put inside the application
bundle.  But since there is no where to put the code when compiling
for X Window, this is a quick fix.  But X Window versions will not
have this capability.

I've just checked this change into the CVS repository.

Andrew



-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390