unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* building emacs on macos 10.15, headers missing
@ 2019-10-10  2:01 Jean-Christophe Helary
  2019-10-10  6:31 ` Paul Eggert
  2019-10-10  7:37 ` 조성빈
  0 siblings, 2 replies; 15+ messages in thread
From: Jean-Christophe Helary @ 2019-10-10  2:01 UTC (permalink / raw)
  To: emacs-devel

https://apple.stackexchange.com/questions/372032/usr-include-missing-on-macos-catalina-with-xcode-11

It looks like it is not easy anymore to build emacs on macos 10.15. Has anyone managed to do that ? What is there to change in the build process ?


Jean-Christophe Helary
-----------------------------------------------
http://mac4translators.blogspot.com @brandelune





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

* Re: building emacs on macos 10.15, headers missing
  2019-10-10  2:01 building emacs on macos 10.15, headers missing Jean-Christophe Helary
@ 2019-10-10  6:31 ` Paul Eggert
  2019-10-10  7:21   ` Jean-Christophe Helary
  2019-10-10  7:37 ` 조성빈
  1 sibling, 1 reply; 15+ messages in thread
From: Paul Eggert @ 2019-10-10  6:31 UTC (permalink / raw)
  To: Jean-Christophe Helary; +Cc: emacs-devel

On 10/9/19 7:01 PM, Jean-Christophe Helary wrote:
> https://apple.stackexchange.com/questions/372032/usr-include-missing-on-macos-catalina-with-xcode-11
> 
> It looks like it is not easy anymore to build emacs on macos 10.15.

That may be, but I don't see the connection between that URL and "it is not easy".

> Has anyone managed to do that ? What is there to change in the build process ?

I don't use macOS, but you might try this:

https://lists.gnu.org/archive/html/emacs-devel/2019-10/msg00056.html



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

* Re: building emacs on macos 10.15, headers missing
  2019-10-10  6:31 ` Paul Eggert
@ 2019-10-10  7:21   ` Jean-Christophe Helary
  0 siblings, 0 replies; 15+ messages in thread
From: Jean-Christophe Helary @ 2019-10-10  7:21 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 884 bytes --]



> On Oct 10, 2019, at 15:31, Paul Eggert <eggert@cs.ucla.edu> wrote:
> 
> On 10/9/19 7:01 PM, Jean-Christophe Helary wrote:
>> https://apple.stackexchange.com/questions/372032/usr-include-missing-on-macos-catalina-with-xcode-11
>> It looks like it is not easy anymore to build emacs on macos 10.15.
> 
> That may be, but I don't see the connection between that URL and "it is not easy".

Easy means "make install" and boom the magic operates.
Not easy involves all sorts of stuff I don't understand.

>> Has anyone managed to do that ? What is there to change in the build process ?
> 
> I don't use macOS, but you might try this:
> 
> https://lists.gnu.org/archive/html/emacs-devel/2019-10/msg00056.html

Definitely. Thank you Paul.

Jean-Christophe Helary
-----------------------------------------------
http://mac4translators.blogspot.com @brandelune



[-- Attachment #2: Type: text/html, Size: 2918 bytes --]

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

* Re: building emacs on macos 10.15, headers missing
  2019-10-10  2:01 building emacs on macos 10.15, headers missing Jean-Christophe Helary
  2019-10-10  6:31 ` Paul Eggert
@ 2019-10-10  7:37 ` 조성빈
  2019-10-10  8:19   ` Jean-Christophe Helary
  1 sibling, 1 reply; 15+ messages in thread
From: 조성빈 @ 2019-10-10  7:37 UTC (permalink / raw)
  To: Jean-Christophe Helary; +Cc: emacs-devel



> 2019. 10. 10. 오전 11:01, Jean-Christophe Helary <jean.christophe.helary@traduction-libre.org> 작성:
> 
> https://apple.stackexchange.com/questions/372032/usr-include-missing-on-macos-catalina-with-xcode-11
> 
> It looks like it is not easy anymore to build emacs on macos 10.15. Has anyone managed to do that ? What is there to change in the build process ?

Well, I found that just installing libxml2 with homebrew and setting PKG_CONFIG_PATH as "/usr/local/opt/libxml2/lib/pkgconfig" (instead of trying to use the default one) is the most frictionless way to build Emacs.

> Jean-Christophe Helary
> -----------------------------------------------
> http://mac4translators.blogspot.com @brandelune




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

* Re: building emacs on macos 10.15, headers missing
  2019-10-10  7:37 ` 조성빈
@ 2019-10-10  8:19   ` Jean-Christophe Helary
  2019-10-14 13:09     ` Alan Third
  0 siblings, 1 reply; 15+ messages in thread
From: Jean-Christophe Helary @ 2019-10-10  8:19 UTC (permalink / raw)
  To: emacs-devel



> On Oct 10, 2019, at 16:37, 조성빈 <pcr910303@icloud.com> wrote:
> 
> 
> 
>> 2019. 10. 10. 오전 11:01, Jean-Christophe Helary <jean.christophe.helary@traduction-libre.org> 작성:
>> 
>> https://apple.stackexchange.com/questions/372032/usr-include-missing-on-macos-catalina-with-xcode-11
>> 
>> It looks like it is not easy anymore to build emacs on macos 10.15. Has anyone managed to do that ? What is there to change in the build process ?
> 
> Well, I found that just installing libxml2 with homebrew and setting PKG_CONFIG_PATH as "/usr/local/opt/libxml2/lib/pkgconfig" (instead of trying to use the default one) is the most frictionless way to build Emacs.

I just tried that and it seems to proceed smoothly and not choke at the same point. Thank you very much for your input !

Jean-Christophe Helary
-----------------------------------------------
http://mac4translators.blogspot.com @brandelune





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

* Re: building emacs on macos 10.15, headers missing
  2019-10-10  8:19   ` Jean-Christophe Helary
@ 2019-10-14 13:09     ` Alan Third
  2019-10-15 21:46       ` Jean-Christophe Helary
  0 siblings, 1 reply; 15+ messages in thread
From: Alan Third @ 2019-10-14 13:09 UTC (permalink / raw)
  To: Jean-Christophe Helary; +Cc: emacs-devel

On Thu, Oct 10, 2019 at 05:19:57PM +0900, Jean-Christophe Helary wrote:
> 
> 
> > On Oct 10, 2019, at 16:37, 조성빈 <pcr910303@icloud.com> wrote:
> > Well, I found that just installing libxml2 with homebrew and
> > setting PKG_CONFIG_PATH as "/usr/local/opt/libxml2/lib/pkgconfig"
> > (instead of trying to use the default one) is the most
> > frictionless way to build Emacs.
> 
> I just tried that and it seems to proceed smoothly and not choke at
> the same point. Thank you very much for your input !

Is libxml2 the only thing it balks at? I considered adding a homebrew
check for it in configure, but thought the homebrew folk would
eventually fix the pkg-config error they introduced so it wasn’t worth
it.

Perhaps now is the time to add that check to configure.
-- 
Alan Third



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

* Re: building emacs on macos 10.15, headers missing
  2019-10-14 13:09     ` Alan Third
@ 2019-10-15 21:46       ` Jean-Christophe Helary
  2019-10-17  9:29         ` Alan Third
  0 siblings, 1 reply; 15+ messages in thread
From: Jean-Christophe Helary @ 2019-10-15 21:46 UTC (permalink / raw)
  To: emacs-devel



> On Oct 14, 2019, at 22:09, Alan Third <alan@idiocy.org> wrote:
> 
> On Thu, Oct 10, 2019 at 05:19:57PM +0900, Jean-Christophe Helary wrote:
>> 
>> 
>>> On Oct 10, 2019, at 16:37, 조성빈 <pcr910303@icloud.com> wrote:
>>> Well, I found that just installing libxml2 with homebrew and
>>> setting PKG_CONFIG_PATH as "/usr/local/opt/libxml2/lib/pkgconfig"
>>> (instead of trying to use the default one) is the most
>>> frictionless way to build Emacs.
>> 
>> I just tried that and it seems to proceed smoothly and not choke at
>> the same point. Thank you very much for your input !
> 
> Is libxml2 the only thing it balks at?

Yes, as far as I can tell.

> I considered adding a homebrew
> check for it in configure, but thought the homebrew folk would
> eventually fix the pkg-config error they introduced so it wasn’t worth
> it.

error ?

> Perhaps now is the time to add that check to configure.

I'd be happy to test.

Jean-Christophe Helary
-----------------------------------------------
http://mac4translators.blogspot.com @brandelune





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

* Re: building emacs on macos 10.15, headers missing
  2019-10-15 21:46       ` Jean-Christophe Helary
@ 2019-10-17  9:29         ` Alan Third
  2019-10-17 13:51           ` 조성빈
  2019-10-29 22:20           ` Alan Third
  0 siblings, 2 replies; 15+ messages in thread
From: Alan Third @ 2019-10-17  9:29 UTC (permalink / raw)
  To: Jean-Christophe Helary; +Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 1118 bytes --]

On Wed, Oct 16, 2019 at 06:46:12AM +0900, Jean-Christophe Helary wrote:
> > Is libxml2 the only thing it balks at?
> 
> Yes, as far as I can tell.
> 
> > I considered adding a homebrew
> > check for it in configure, but thought the homebrew folk would
> > eventually fix the pkg-config error they introduced so it wasn’t worth
> > it.
> 
> error ?

Homebrew provide a broken .pc file for the system libxml2, it should
be in 

    /usr/local/Homebrew/Library/Homebrew/os/mac/pkgconfig/<os version>/libxml-2.0.pc
    
and points to /usr/include even if it doesn’t exist. I can’t find the
bug report right now, but they had a solution and were just waiting
for someone to implement it. Looks like that’s not happened yet.

> > Perhaps now is the time to add that check to configure.
> 
> I'd be happy to test.

Patch attached. It’s very simple. There’s some code just after the new
code I’ve added that should check for the existence of the xcode SDK
directory, but I think the bogus .pc file provided by homebrew stops
it from running. But I’ve a feeling it maybe doesn’t work anyway...
-- 
Alan Third

[-- Attachment #2: 0001-Allow-configure-to-find-libxml2-installed-by-homebre.patch --]
[-- Type: text/plain, Size: 1038 bytes --]

From d503c59dc903cfb5129d566698016c1bb0398c96 Mon Sep 17 00:00:00 2001
From: Alan Third <alan@idiocy.org>
Date: Thu, 17 Oct 2019 10:22:20 +0100
Subject: [PATCH] Allow configure to find libxml2 installed by homebrew

* configure.ac: Add Homebrew provided .pc file to PKG_CONFIG_PATH.
---
 configure.ac | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/configure.ac b/configure.ac
index 33d725c804..62ab35ab5a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4041,6 +4041,11 @@ AC_DEFUN
 ### mingw32 doesn't use -lxml2, since it loads the library dynamically.
 HAVE_LIBXML2=no
 if test "${with_xml2}" != "no"; then
+  if test -n "$BREW"; then
+    # Makesure pkg-config can find any version installed by homebrew.
+    export PKG_CONFIG_PATH="$PKG_CONFIG_PATH$PATH_SEPARATOR`$BREW --prefix libxml2 2>/dev/null`/lib/pkgconfig"
+  fi
+
   ### I'm not sure what the version number should be, so I just guessed.
   EMACS_CHECK_MODULES([LIBXML2], [libxml-2.0 > 2.6.17])
   # Built-in libxml2 on OS X 10.8 lacks libxml-2.0.pc.
-- 
2.21.0


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

* Re: building emacs on macos 10.15, headers missing
  2019-10-17  9:29         ` Alan Third
@ 2019-10-17 13:51           ` 조성빈
  2019-10-17 21:27             ` Alan Third
  2019-10-29 22:20           ` Alan Third
  1 sibling, 1 reply; 15+ messages in thread
From: 조성빈 @ 2019-10-17 13:51 UTC (permalink / raw)
  To: Alan Third; +Cc: Jean-Christophe Helary, Emacs-devel


> 2019. 10. 17. 오후 6:31, Alan Third <alan@idiocy.org> 작성:
> 
> On Wed, Oct 16, 2019 at 06:46:12AM +0900, Jean-Christophe Helary wrote:
>>> Is libxml2 the only thing it balks at?
>> Yes, as far as I can tell.
>>> I considered adding a homebrew
>>> check for it in configure, but thought the homebrew folk would
>>> eventually fix the pkg-config error they introduced so it wasn’t worth
>>> it.
>> error ?
> 
> Homebrew provide a broken .pc file for the system libxml2, it should
> be in 
> 
>   /usr/local/Homebrew/Library/Homebrew/os/mac/pkgconfig/<os version>/libxml-2.0.pc
> 
> and points to /usr/include even if it doesn’t exist. I can’t find the
> bug report right now, but they had a solution and were just waiting
> for someone to implement it. Looks like that’s not happened yet.

This is just a curiosity, but is that strictly Homebrew’s fault or is it from upstream (pkg-config) one?

>>> Perhaps now is the time to add that check to configure.
>> I'd be happy to test.
> 
> Patch attached. It’s very simple. There’s some code just after the new
> code I’ve added that should check for the existence of the xcode SDK
> directory, but I think the bogus .pc file provided by homebrew stops
> it from running. But I’ve a feeling it maybe doesn’t work anyway...
> -- 
> Alan Third
> <0001-Allow-configure-to-find-libxml2-installed-by-homebre.patch>




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

* Re: building emacs on macos 10.15, headers missing
  2019-10-17 13:51           ` 조성빈
@ 2019-10-17 21:27             ` Alan Third
  0 siblings, 0 replies; 15+ messages in thread
From: Alan Third @ 2019-10-17 21:27 UTC (permalink / raw)
  To: 조성빈; +Cc: Jean-Christophe Helary, Emacs-devel

On Thu, Oct 17, 2019 at 10:51:11PM +0900, 조성빈 wrote:
> 
> > 2019. 10. 17. 오후 6:31, Alan Third <alan@idiocy.org> 작성:
> > 
> > Homebrew provide a broken .pc file for the system libxml2, it should
> > be in 
> > 
> >   /usr/local/Homebrew/Library/Homebrew/os/mac/pkgconfig/<os version>/libxml-2.0.pc
> > 
> > and points to /usr/include even if it doesn’t exist. I can’t find the
> > bug report right now, but they had a solution and were just waiting
> > for someone to implement it. Looks like that’s not happened yet.
> 
> This is just a curiosity, but is that strictly Homebrew’s fault or
> is it from upstream (pkg-config) one?

No, it’s a Homebrew thing. The system libxml2 doesn’t have a .pc file,
so they created their own one to point to it. Unfortunately when Apple
stopped shipping the includes that setup stopped working.

IIRC, if you look in the directory you’ll see other .pc files for
other system libraries. Libxml2 just seems to be the one that causes a
lot of hassle.
-- 
Alan Third



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

* Re: building emacs on macos 10.15, headers missing
  2019-10-17  9:29         ` Alan Third
  2019-10-17 13:51           ` 조성빈
@ 2019-10-29 22:20           ` Alan Third
  2019-10-29 22:35             ` Paul Eggert
                               ` (2 more replies)
  1 sibling, 3 replies; 15+ messages in thread
From: Alan Third @ 2019-10-29 22:20 UTC (permalink / raw)
  To: Jean-Christophe Helary; +Cc: emacs-devel

On Thu, Oct 17, 2019 at 10:29:50AM +0100, Alan Third wrote:
> 
> Patch attached. It’s very simple. There’s some code just after the new
> code I’ve added that should check for the existence of the xcode SDK
> directory, but I think the bogus .pc file provided by homebrew stops
> it from running. But I’ve a feeling it maybe doesn’t work anyway...

Did anyone get a chance to test the patch?
-- 
Alan Third



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

* Re: building emacs on macos 10.15, headers missing
  2019-10-29 22:20           ` Alan Third
@ 2019-10-29 22:35             ` Paul Eggert
  2019-10-29 23:02             ` 조성빈
  2019-10-29 23:32             ` Jean-Christophe Helary
  2 siblings, 0 replies; 15+ messages in thread
From: Paul Eggert @ 2019-10-29 22:35 UTC (permalink / raw)
  To: Alan Third, Jean-Christophe Helary; +Cc: emacs-devel

On 10/29/19 3:20 PM, Alan Third wrote:

> Did anyone get a chance to test the patch?

I didn't (as I don't use macOS), but I'm puzzled by the patch. Is the 
idea that the builder should set the BREW environment variable to some 
magic value, so that 'configure' picks this up and adds it to 
PKG_CONFIG_PATH? If so, why can't the builder just set PKG_CONFIG_PATH 
directly? If not, what am I missing (and perhaps there should be a comment)?



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

* Re: building emacs on macos 10.15, headers missing
  2019-10-29 22:20           ` Alan Third
  2019-10-29 22:35             ` Paul Eggert
@ 2019-10-29 23:02             ` 조성빈
  2019-10-30 20:28               ` Alan Third
  2019-10-29 23:32             ` Jean-Christophe Helary
  2 siblings, 1 reply; 15+ messages in thread
From: 조성빈 @ 2019-10-29 23:02 UTC (permalink / raw)
  To: Alan Third; +Cc: Jean-Christophe Helary, emacs-devel



> 2019. 10. 30. 오전 7:20, Alan Third <alan@idiocy.org> 작성:
> 
> On Thu, Oct 17, 2019 at 10:29:50AM +0100, Alan Third wrote:
>> 
>> Patch attached. It’s very simple. There’s some code just after the new
>> code I’ve added that should check for the existence of the xcode SDK
>> directory, but I think the bogus .pc file provided by homebrew stops
>> it from running. But I’ve a feeling it maybe doesn’t work anyway...
> 
> Did anyone get a chance to test the patch?

I was just waiting for Home-brew to fix the pkg-config file for libxml2, which is located here: https://github.com/Homebrew/brew/blob/master/Library/Homebrew/os/mac/pkgconfig/10.15/libxml-2.0.pc

Looks like it’s not getting a lot of care, so I would like to make a PR there, but as I’m not familiar with .pc files I’m not sure how to edit them.
Looks like not only libxml2 but also sqlite3, libcurl and other system provided libraries are affected.

I’m just opening an issue for now, linking to this thread.

> -- 
> Alan Third
> 




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

* Re: building emacs on macos 10.15, headers missing
  2019-10-29 22:20           ` Alan Third
  2019-10-29 22:35             ` Paul Eggert
  2019-10-29 23:02             ` 조성빈
@ 2019-10-29 23:32             ` Jean-Christophe Helary
  2 siblings, 0 replies; 15+ messages in thread
From: Jean-Christophe Helary @ 2019-10-29 23:32 UTC (permalink / raw)
  To: emacs-devel



> On Oct 30, 2019, at 7:20, Alan Third <alan@idiocy.org> wrote:
> 
> On Thu, Oct 17, 2019 at 10:29:50AM +0100, Alan Third wrote:
>> 
>> Patch attached. It’s very simple. There’s some code just after the new
>> code I’ve added that should check for the existence of the xcode SDK
>> directory, but I think the bogus .pc file provided by homebrew stops
>> it from running. But I’ve a feeling it maybe doesn’t work anyway...
> 
> Did anyone get a chance to test the patch?

No time yet. Sorry.

Jean-Christophe Helary
-----------------------------------------------
http://mac4translators.blogspot.com @brandelune





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

* Re: building emacs on macos 10.15, headers missing
  2019-10-29 23:02             ` 조성빈
@ 2019-10-30 20:28               ` Alan Third
  0 siblings, 0 replies; 15+ messages in thread
From: Alan Third @ 2019-10-30 20:28 UTC (permalink / raw)
  To: 조성빈; +Cc: Jean-Christophe Helary, emacs-devel

On Wed, Oct 30, 2019 at 08:02:24AM +0900, 조성빈 wrote:
> 
> 
> > 2019. 10. 30. 오전 7:20, Alan Third <alan@idiocy.org> 작성:
> > 
> > On Thu, Oct 17, 2019 at 10:29:50AM +0100, Alan Third wrote:
> >> 
> >> Patch attached. It’s very simple. There’s some code just after the new
> >> code I’ve added that should check for the existence of the xcode SDK
> >> directory, but I think the bogus .pc file provided by homebrew stops
> >> it from running. But I’ve a feeling it maybe doesn’t work anyway...
> > 
> > Did anyone get a chance to test the patch?
> 
> I was just waiting for Home-brew to fix the pkg-config file for
> libxml2, which is located here:
> https://github.com/Homebrew/brew/blob/master/Library/Homebrew/os/mac/pkgconfig/10.15/libxml-2.0.pc
> 
> Looks like it’s not getting a lot of care, so I would like to make a
> PR there, but as I’m not familiar with .pc files I’m not sure how to
> edit them. Looks like not only libxml2 but also sqlite3, libcurl and
> other system provided libraries are affected.
> 
> I’m just opening an issue for now, linking to this thread.

I see they’ve reopened the original issue since you opened your own.

    https://github.com/Homebrew/brew/issues/5068

Hopefully something (anything!) comes from it this time.
-- 
Alan Third



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

end of thread, other threads:[~2019-10-30 20:28 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-10  2:01 building emacs on macos 10.15, headers missing Jean-Christophe Helary
2019-10-10  6:31 ` Paul Eggert
2019-10-10  7:21   ` Jean-Christophe Helary
2019-10-10  7:37 ` 조성빈
2019-10-10  8:19   ` Jean-Christophe Helary
2019-10-14 13:09     ` Alan Third
2019-10-15 21:46       ` Jean-Christophe Helary
2019-10-17  9:29         ` Alan Third
2019-10-17 13:51           ` 조성빈
2019-10-17 21:27             ` Alan Third
2019-10-29 22:20           ` Alan Third
2019-10-29 22:35             ` Paul Eggert
2019-10-29 23:02             ` 조성빈
2019-10-30 20:28               ` Alan Third
2019-10-29 23:32             ` Jean-Christophe Helary

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).