unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Emacs with GNUstep
@ 2012-12-29  1:00 Germán A. Arias
  2012-12-29  8:02 ` Andreas Schwab
  2012-12-29  8:22 ` Andreas Schwab
  0 siblings, 2 replies; 5+ messages in thread
From: Germán A. Arias @ 2012-12-29  1:00 UTC (permalink / raw)
  To: Emacs-devel

With pretest 24.2.91 I had a problem to compile. I get something like:

gcc -std=gnu99 -rdynamic -Demacs  -I.
-I/home/german/Instalados/desde-codigo/emacs-24.2.91/src -I../lib
-I/home/german/Instalados/desde-codigo/emacs-24.2.91/src/../lib
-D_REENTRANT -fPIC -fno-strict-aliasing
-I/usr/GNUstep/System/Library/Headers
-I/usr/GNUstep/Local/Library/Headers    -I/usr/include/libxml2
-I/usr/include/dbus-1.0 -I/usr/lib/i386-linux-gnu/dbus-1.0/include
-MMD -MF deps/.d -MP     -g3 -O2
-L/usr/GNUstep/System/Library/Libraries
-L/usr/GNUstep/Local/Library/Libraries -lgnustep-gui -lgnustep-base
-lobjc -lpthread  \
	  -o temacs  dispnew.o frame.o scroll.o xdisp.o menu.o  window.o
charset.o coding.o category.o ccl.o character.o chartab.o bidi.o cm.o
term.o terminal.o xfaces.o   dbusbind.o emacs.o keyboard.o macros.o
keymap.o sysdep.o buffer.o filelock.o insdel.o marker.o minibuf.o
fileio.o dired.o cmds.o casetab.o casefiddle.o indent.o search.o regex.o
undo.o alloc.o data.o doc.o editfns.o callint.o eval.o floatfns.o fns.o
font.o print.o lread.o syntax.o unexelf.o bytecode.o process.o gnutls.o
callproc.o region-cache.o sound.o atimer.o doprnt.o intervals.o
textprop.o composite.o xml.o profiler.o       fontset.o fringe.o image.o
nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o terminfo.o
lastfile.o    vm-limit.o   ../lib/libgnu.a          -lrt -lrt  -ldbus-1
-lpthread -lrt    -lxml2      -ltinfo   -lselinux     -lgnutls
-lpthread   -lm  
nsterm.o: In function `ns_constrain_all_frames':
/home/german/Instalados/desde-codigo/emacs-24.2.91/src/nsterm.m:574:
undefined reference to `objc_msg_lookup'


the gnustep libraries flags are present. But this don't works. Googling
I found this:

http://stackoverflow.com/questions/11425120/objective-c-on-linux-compile-error

So, I solved the problem adding "-Wl,--no-as-needed" at line 4360 in configure.ac:

LD_SWITCH_SYSTEM_TEMACS="${LD_SWITCH_SYSTEM_TEMACS} -L
${GNUSTEP_SYSTEM_LIBRARIES} ${GNUSTEP_LOCAL_LIBRARIES}
-Wl,--no-as-needed -lgnustep-gui -lgnustep-base -lobjc -lpthread"

Could be possible add this flag in trunk? Thanks.




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Emacs with GNUstep
  2012-12-29  1:00 Emacs with GNUstep Germán A. Arias
@ 2012-12-29  8:02 ` Andreas Schwab
  2012-12-29  8:22 ` Andreas Schwab
  1 sibling, 0 replies; 5+ messages in thread
From: Andreas Schwab @ 2012-12-29  8:02 UTC (permalink / raw)
  To: Germán A. Arias; +Cc: Emacs-devel

Germán "A. Arias" <german@xelalug.org> writes:

> So, I solved the problem adding "-Wl,--no-as-needed" at line 4360 in configure.ac:
>
> LD_SWITCH_SYSTEM_TEMACS="${LD_SWITCH_SYSTEM_TEMACS} -L
> ${GNUSTEP_SYSTEM_LIBRARIES} ${GNUSTEP_LOCAL_LIBRARIES}
> -Wl,--no-as-needed -lgnustep-gui -lgnustep-base -lobjc -lpthread"
>
> Could be possible add this flag in trunk? Thanks.

No, that is wrong.  The bug is that the libraries are added to
LD_SWITCH_SYSTEM_TEMACS, when they are supposed to be added to LIBES.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Emacs with GNUstep
  2012-12-29  1:00 Emacs with GNUstep Germán A. Arias
  2012-12-29  8:02 ` Andreas Schwab
@ 2012-12-29  8:22 ` Andreas Schwab
  2012-12-29 19:24   ` Germán A. Arias
  1 sibling, 1 reply; 5+ messages in thread
From: Andreas Schwab @ 2012-12-29  8:22 UTC (permalink / raw)
  To: Germán A. Arias; +Cc: Emacs-devel

This should fix it.

Andreas.

diff --git a/configure.ac b/configure.ac
index 429443c..2f1124d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1475,8 +1475,8 @@ tmp_CPPFLAGS="$CPPFLAGS"
 tmp_CFLAGS="$CFLAGS"
 CPPFLAGS="$CPPFLAGS -x objective-c"
 CFLAGS="$CFLAGS -x objective-c"
-TEMACS_LDFLAGS2="\${LDFLAGS}"
 GNU_OBJC_CFLAGS=
+LIBS_GNUSTEP=
 if test "${with_ns}" != no; then
   if test "${opsys}" = darwin; then
      NS_IMPL_COCOA=yes
@@ -1503,9 +1503,9 @@ if test "${with_ns}" != no; then
      CPPFLAGS="$CPPFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
      CFLAGS="$CFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
      LDFLAGS="$LDFLAGS -L${GNUSTEP_SYSTEM_LIBRARIES} ${GNUSTEP_LOCAL_LIBRARIES}"
+     LIBS_GNUSTEP="-lgnustep-gui -lgnustep-base -lobjc -lpthread"
      LIB_STANDARD=
      START_FILES=
-     TEMACS_LDFLAGS2=
      dnl GNUstep defines BASE_NATIVE_OBJC_EXCEPTIONS to 0 or 1.
      dnl If they had chosen to either define it or not, we could have
      dnl just used AC_CHECK_DECL here.
@@ -1556,7 +1556,7 @@ fail;
   fi
 fi
 
-AC_SUBST(TEMACS_LDFLAGS2)
+AC_SUBST(LIBS_GNUSTEP)
 
 INSTALL_ARCH_INDEP_EXTRA=install-etc
 ns_self_contained=no
@@ -4287,10 +4287,6 @@ case "$opsys" in
   *) LD_SWITCH_SYSTEM_TEMACS= ;;
 esac
 
-if test "$NS_IMPL_GNUSTEP" = "yes"; then
-  LD_SWITCH_SYSTEM_TEMACS="${LD_SWITCH_SYSTEM_TEMACS} -L${GNUSTEP_SYSTEM_LIBRARIES} ${GNUSTEP_LOCAL_LIBRARIES} -lgnustep-gui -lgnustep-base -lobjc -lpthread"
-fi
-
 AC_SUBST(LD_SWITCH_SYSTEM_TEMACS)
 
 
diff --git a/src/Makefile.in b/src/Makefile.in
index 0e91eae..96b1d6d 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -111,9 +111,6 @@ LD_SWITCH_SYSTEM_TEMACS=@LD_SWITCH_SYSTEM_TEMACS@
 ## Flags to pass to ld only for temacs.
 TEMACS_LDFLAGS = $(LD_SWITCH_SYSTEM) $(LD_SWITCH_SYSTEM_TEMACS)
 
-## $LDFLAGS or empty if NS_IMPL_GNUSTEP (for some reason).
-TEMACS_LDFLAGS2 = @TEMACS_LDFLAGS2@
-
 ## If available, the full path to the paxctl program.
 ## On grsecurity/PaX systems, unexec will fail due to a gap between
 ## the bss section and the heap.  This can be prevented by disabling
@@ -230,6 +227,9 @@ LIBX_OTHER=@LIBX_OTHER@
 ## configure, which should set it to nil in non-X builds.
 LIBX_BASE=$(LIBXMENU) $(LD_SWITCH_X_SITE)
 
+## Only used for GNUstep
+LIBS_GNUSTEP=@LIBS_GNUSTEP@
+
 LIBSOUND= @LIBSOUND@
 CFLAGS_SOUND= @CFLAGS_SOUND@
 
@@ -400,7 +400,7 @@ otherobj= $(TERMCAP_OBJ) $(PRE_ALLOC_OBJ) $(GMALLOC_OBJ) $(RALLOC_OBJ) \
 ## Note that SunOS needs -lm to come before -lc; otherwise, you get
 ## duplicated symbols.  If the standard libraries were compiled
 ## with GCC, we might need LIB_GCC again after them.
-LIBES = $(LIBS) $(W32_LIBS) $(LIBX_BASE) $(LIBIMAGE) \
+LIBES = $(LIBS) $(W32_LIBS) $(LIBS_GNUSTEP) $(LIBX_BASE) $(LIBIMAGE) \
    $(LIBX_OTHER) $(LIBSOUND) \
    $(RSVG_LIBS) $(IMAGEMAGICK_LIBS) $(LIB_CLOCK_GETTIME) \
    $(LIB_EACCESS) $(LIB_TIMER_TIME) $(DBUS_LIBS) \
@@ -475,7 +475,7 @@ $(lib)/libgnu.a: $(config_h)
 
 temacs$(EXEEXT): $(START_FILES) stamp-oldxmenu $(obj) $(otherobj) \
 	         $(lib)/libgnu.a $(W32_RES)
-	$(CC) $(LD_FIRSTFLAG) $(ALL_CFLAGS) $(TEMACS_LDFLAGS) $(TEMACS_LDFLAGS2) \
+	$(CC) $(LD_FIRSTFLAG) $(ALL_CFLAGS) $(TEMACS_LDFLAGS) $(LDFLAGS) \
 	  -o temacs $(START_FILES) $(obj) $(otherobj) $(lib)/libgnu.a $(LIBES) \
 	  $(W32_RES_LINK)
 	test "$(CANNOT_DUMP)" = "yes" || \

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: Emacs with GNUstep
  2012-12-29  8:22 ` Andreas Schwab
@ 2012-12-29 19:24   ` Germán A. Arias
  2012-12-29 19:44     ` Andreas Schwab
  0 siblings, 1 reply; 5+ messages in thread
From: Germán A. Arias @ 2012-12-29 19:24 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: Emacs-devel

El sáb, 29-12-2012 a las 09:22 +0100, Andreas Schwab escribió:
> This should fix it.
> 
> Andreas.
> 
> diff --git a/configure.ac b/configure.ac
> index 429443c..2f1124d 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -1475,8 +1475,8 @@ tmp_CPPFLAGS="$CPPFLAGS"
>  tmp_CFLAGS="$CFLAGS"
>  CPPFLAGS="$CPPFLAGS -x objective-c"
>  CFLAGS="$CFLAGS -x objective-c"
> -TEMACS_LDFLAGS2="\${LDFLAGS}"
>  GNU_OBJC_CFLAGS=
> +LIBS_GNUSTEP=
>  if test "${with_ns}" != no; then
>    if test "${opsys}" = darwin; then
>       NS_IMPL_COCOA=yes
> @@ -1503,9 +1503,9 @@ if test "${with_ns}" != no; then
>       CPPFLAGS="$CPPFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
>       CFLAGS="$CFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
>       LDFLAGS="$LDFLAGS -L${GNUSTEP_SYSTEM_LIBRARIES} ${GNUSTEP_LOCAL_LIBRARIES}"
> +     LIBS_GNUSTEP="-lgnustep-gui -lgnustep-base -lobjc -lpthread"
>       LIB_STANDARD=
>       START_FILES=
> -     TEMACS_LDFLAGS2=
>       dnl GNUstep defines BASE_NATIVE_OBJC_EXCEPTIONS to 0 or 1.
>       dnl If they had chosen to either define it or not, we could have
>       dnl just used AC_CHECK_DECL here.
> @@ -1556,7 +1556,7 @@ fail;
>    fi
>  fi
>  
> -AC_SUBST(TEMACS_LDFLAGS2)
> +AC_SUBST(LIBS_GNUSTEP)
>  
>  INSTALL_ARCH_INDEP_EXTRA=install-etc
>  ns_self_contained=no
> @@ -4287,10 +4287,6 @@ case "$opsys" in
>    *) LD_SWITCH_SYSTEM_TEMACS= ;;
>  esac
>  
> -if test "$NS_IMPL_GNUSTEP" = "yes"; then
> -  LD_SWITCH_SYSTEM_TEMACS="${LD_SWITCH_SYSTEM_TEMACS} -L${GNUSTEP_SYSTEM_LIBRARIES} ${GNUSTEP_LOCAL_LIBRARIES} -lgnustep-gui -lgnustep-base -lobjc -lpthread"
> -fi
> -
>  AC_SUBST(LD_SWITCH_SYSTEM_TEMACS)
>  
> 
> diff --git a/src/Makefile.in b/src/Makefile.in
> index 0e91eae..96b1d6d 100644
> --- a/src/Makefile.in
> +++ b/src/Makefile.in
> @@ -111,9 +111,6 @@ LD_SWITCH_SYSTEM_TEMACS=@LD_SWITCH_SYSTEM_TEMACS@
>  ## Flags to pass to ld only for temacs.
>  TEMACS_LDFLAGS = $(LD_SWITCH_SYSTEM) $(LD_SWITCH_SYSTEM_TEMACS)
>  
> -## $LDFLAGS or empty if NS_IMPL_GNUSTEP (for some reason).
> -TEMACS_LDFLAGS2 = @TEMACS_LDFLAGS2@
> -
>  ## If available, the full path to the paxctl program.
>  ## On grsecurity/PaX systems, unexec will fail due to a gap between
>  ## the bss section and the heap.  This can be prevented by disabling
> @@ -230,6 +227,9 @@ LIBX_OTHER=@LIBX_OTHER@
>  ## configure, which should set it to nil in non-X builds.
>  LIBX_BASE=$(LIBXMENU) $(LD_SWITCH_X_SITE)
>  
> +## Only used for GNUstep
> +LIBS_GNUSTEP=@LIBS_GNUSTEP@
> +
>  LIBSOUND= @LIBSOUND@
>  CFLAGS_SOUND= @CFLAGS_SOUND@
>  
> @@ -400,7 +400,7 @@ otherobj= $(TERMCAP_OBJ) $(PRE_ALLOC_OBJ) $(GMALLOC_OBJ) $(RALLOC_OBJ) \
>  ## Note that SunOS needs -lm to come before -lc; otherwise, you get
>  ## duplicated symbols.  If the standard libraries were compiled
>  ## with GCC, we might need LIB_GCC again after them.
> -LIBES = $(LIBS) $(W32_LIBS) $(LIBX_BASE) $(LIBIMAGE) \
> +LIBES = $(LIBS) $(W32_LIBS) $(LIBS_GNUSTEP) $(LIBX_BASE) $(LIBIMAGE) \
>     $(LIBX_OTHER) $(LIBSOUND) \
>     $(RSVG_LIBS) $(IMAGEMAGICK_LIBS) $(LIB_CLOCK_GETTIME) \
>     $(LIB_EACCESS) $(LIB_TIMER_TIME) $(DBUS_LIBS) \
> @@ -475,7 +475,7 @@ $(lib)/libgnu.a: $(config_h)
>  
>  temacs$(EXEEXT): $(START_FILES) stamp-oldxmenu $(obj) $(otherobj) \
>  	         $(lib)/libgnu.a $(W32_RES)
> -	$(CC) $(LD_FIRSTFLAG) $(ALL_CFLAGS) $(TEMACS_LDFLAGS) $(TEMACS_LDFLAGS2) \
> +	$(CC) $(LD_FIRSTFLAG) $(ALL_CFLAGS) $(TEMACS_LDFLAGS) $(LDFLAGS) \
>  	  -o temacs $(START_FILES) $(obj) $(otherobj) $(lib)/libgnu.a $(LIBES) \
>  	  $(W32_RES_LINK)
>  	test "$(CANNOT_DUMP)" = "yes" || \
> 

This solve the problem. Thanks.




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Emacs with GNUstep
  2012-12-29 19:24   ` Germán A. Arias
@ 2012-12-29 19:44     ` Andreas Schwab
  0 siblings, 0 replies; 5+ messages in thread
From: Andreas Schwab @ 2012-12-29 19:44 UTC (permalink / raw)
  To: Germán A. Arias; +Cc: Emacs-devel

Thanks, installed.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-12-29 19:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-29  1:00 Emacs with GNUstep Germán A. Arias
2012-12-29  8:02 ` Andreas Schwab
2012-12-29  8:22 ` Andreas Schwab
2012-12-29 19:24   ` Germán A. Arias
2012-12-29 19:44     ` Andreas Schwab

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).