Closed fakiyer closed 6 years ago
Hi, @fakiyer Can you put the results to the gist?
brew install --verbose --HEAD universal-ctags/universal-ctags/universal-ctags
Hi, @KazuakiM OK. Here are results:
https://gist.github.com/fakiyer/3a32c1c69a2c1f6226658adb1eacc8d9
@masatake Do you have any solutions?
Looks very strange. Maybe a broken errno.h file is installed to @fakiyer's environment and oru build-sys includes it.
What we expect as errno.h may be https://github.com/st3fan/osx-10.9/blob/master/xnu-2422.1.72/bsd/sys/errno.h.
As far as reading https://github.com/Homebrew/homebrew-core/blob/master/Formula/lsof.rb, I guess errno.h may be at "#{MacOS.sdk_path}/usr/include". I wonder following patch for universal-ctags.rb can avoid including the unwanted header file:
--- /tmp/universal-ctags.rb.orig 2018-08-06 02:07:53.063954036 +0900
+++ /tmp/universal-ctags.rb 2018-08-06 02:04:31.608744264 +0900
@@ -31,7 +31,7 @@
system "./autogen.sh"
system "./configure", "--prefix=#{prefix}", *opts
- system "make"
+ system "make", "AM_CPPFLAGS=-I #{MacOS.sdk_path}/usr/include"
system "make", "install"
end
I tried it but still getting error...
~ » xcrun --sdk macosx --show-sdk-path
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk
~ » brew install --HEAD universal-ctags/universal-ctags/universal-ctags
==> Installing universal-ctags from universal-ctags/universal-ctags
==> Cloning https://github.com/universal-ctags/ctags.git
Updating /Users/fakiyer/Library/Caches/Homebrew/universal-ctags--git
==> Checking out branch master
Already on 'master'
Your branch is up to date with 'origin/master'.
HEAD is now at 0d560136 Merge pull request #1807 from b4n/utf8-pattern-truncation
==> Downloading https://files.pythonhosted.org/packages/84/f4/5771e41fdf52aabebbadecc9381d11dea0fa34e4759b4071244fa094804c/docutils-0.14.tar.gz
Already downloaded: /Users/fakiyer/Library/Caches/Homebrew/universal-ctags--docutils-0.14.tar.gz
==> python -c import setuptools... --no-user-cfg install --prefix=/usr/local/Cellar/universal-ctags/HEAD-0d56013/libexec/vendor --single-version-externally-managed --record=installed.txt
==> ./autogen.sh
==> ./configure --prefix=/usr/local/Cellar/universal-ctags/HEAD-0d56013
==> make AM_CPPFLAGS=-I /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include
Last 15 lines from /Users/fakiyer/Library/Logs/Homebrew/universal-ctags/04.make:
extern void error (const errorSelection selection, const char *const format, ...) CTAGS_ATTR_PRINTF (2, 3);
^
main/entry.c:359:32: error: use of undeclared identifier 'ENOENT'
if (mio == NULL && errno == ENOENT)
^
main/entry.c:584:61: error: use of undeclared identifier 'errno'; did you mean 'error'?
fprintf (stderr, "Cannot shorten tag file: errno = %d\n", errno);
^~~~~
error
./main/routines.h:97:13: note: 'error' declared here
extern void error (const errorSelection selection, const char *const format, ...) CTAGS_ATTR_PRINTF (2, 3);
^
3 errors generated.
make[1]: *** [main/ctags-entry.o] Error 1
make: *** [all] Error 2
If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
https://github.com/universal-ctags/homebrew-universal-ctags/issues
@fakiyer, could you try to install lsof
via brew?
lsof also uses errno.
@masatake Yes, I could.
~ » brew install lsof
==> Downloading https://homebrew.bintray.com/bottles/lsof-4.91.high_sierra.bottle.tar.gz
######################################################################## 100.0%
==> Pouring lsof-4.91.high_sierra.bottle.tar.gz
🍺 /usr/local/Cellar/lsof/4.91: 6 files, 288KB
(I don't know brew well.)
@fakiyer, thank you. But it seems that you tried the binary package of lsof. I would like to know whether you can introduce source package(?) of lsof. Could you try though I don't know how to do it?
Like u-ctags, lsof uses errno and ENOENT in its source code. If you can build lsof binary without trouble, the brew build-script(?) of u-ctags does something wrong. If you cannot build lsof binary because the compiler cannot find the declaration of errno and the definition of ENOENT, I guess your environment may be broken.
Is this alright?
~ » brew install --build-from-source lsof fakiyer@MacBook-Pro
==> Downloading https://www.mirrorservice.org/sites/lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_4.91.tar.bz2
Already downloaded: /Users/fakiyer/Library/Caches/Homebrew/lsof-4.91.tar.bz2
==> tar xf lsof_4.91_src.tar
==> ./Configure -n darwin
==> make
🍺 /usr/local/Cellar/lsof/4.91: 6 files, 288KB, built in 6 seconds
But, when trying to install zsh from source, I got an error...
~ » brew reinstall --build-from-source zsh
==> Reinstalling zsh
==> Downloading https://downloads.sourceforge.net/project/zsh/zsh/5.5.1/zsh-5.5.
Already downloaded: /Users/fakiyer/Library/Caches/Homebrew/zsh-5.5.1.tar.xz
==> ./configure --prefix=/usr/local/Cellar/zsh/5.5.1 --enable-fndir=/usr/local/C
Last 15 lines from /Users/fakiyer/Library/Logs/Homebrew/zsh/01.configure:
checking for dlsym... yes
checking for dlclose... yes
checking for load... no
checking for loadquery... no
checking for loadbind... no
checking for unload... no
checking for shl_load... no
checking for shl_unload... no
checking for shl_findsym... no
checking if getxattr etc. are Linux-like... no
checking if getxattr etc. are MAC-like... yes
checking if getxattr etc. are usable... yes
checking what style of signals to use... POSIX_SIGNALS
checking where signal.h is located... /usr/include/sys/signal.h
checking where error names are located... configure: error: ERROR MACROS NOT FOUND: please report to developers
READ THIS: https://docs.brew.sh/Troubleshooting
@masatake @KazuakiM It worked after clean install. Thanks a lot for your help.
@fakiyer do you still remember what did you mean by "clean install"? I'm running into the same problem
@madtrick It's to return to factory settings.
@fakiyer reset the computer? 😱
@madtrick Unfortunately, yes... I reset MacOS and reinstalled universal-ctags.
ok, thx for the info 😄
@madtrick : First of all, a gist with verbose log of the build process would certainly help to know more about your specific problem.
If you don't want to go to an extent of reinstalling macOS and try few things, I would suggest following options:
brew update
, then do a brew doctor
and fixing any issues it reports. Try installing ctags.brew bundle dump
and remove brew completely. Then do a restart (just in case), and install brew again. Try installing ctags. If you succeed, you have the Brewfile
that you generated inn brew bundle dump
that you can use to recover your old brew installs.
Attempting to run
brew install --HEAD universal-ctags/universal-ctags/universal-ctags
on OS X 10.13.6 results in an error 2 from Make.