Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

log4cxx build failure on macOS Sierra (OSX/macOS 10.12) #5599

Closed
2 tasks done
kubark42 opened this issue Oct 4, 2016 · 7 comments
Closed
2 tasks done

log4cxx build failure on macOS Sierra (OSX/macOS 10.12) #5599

kubark42 opened this issue Oct 4, 2016 · 7 comments

Comments

@kubark42
Copy link

kubark42 commented Oct 4, 2016

  • Ran brew update and retried your prior step?
  • Ran brew doctor, fixed as many issues as possible and retried your prior step?
$> brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry and just ignore them. Thanks!

Warning: Broken symlinks were found. Remove them with `brew prune`:
    /usr/local/bin/apm
    /usr/local/bin/atom

$>

Bug report:

log4cxx fails to build. Apparently it can't find APR and APR-UTIL.

.
.
.
checking for APR... no
configure: error: APR could not be located. Please use the --with-apr option.

However, APR and APR-UTIL are installed.

$> brew search apr
apr ✔                      haproxy                    snapraid                 
apr-util ✔                 homebrew/science/reapr   
chromaprint                metaproxy                
Caskroom/cask/caprine
$>

Full dump here: https://gist.github.com/anonymous/3697382b240654b0809fc8982a9d38a5

@kubark42
Copy link
Author

kubark42 commented Oct 4, 2016

I was able to muddle past this point by doing brew edit log4cxx and replacing

system "./configure", "--disable-debug", "--disable-dependency-tracking",
                      "--prefix=#{prefix}",
                      # Docs won't install on OS X
                      "--disable-doxygen"

with

system "./configure", "--disable-debug", "--disable-dependency-tracking",
                      "--prefix=#{prefix}",
                      # Docs won't install on OS X
                      "--disable-doxygen",
                      "--with-apr=/usr/local/Cellar/apr/1.5.2_3/bin/",
                      "--with-apr-util=/usr/local/Cellar/apr-util/1.5.4_4/bin/"

NOTE: Fixing just the APR path was not enough, it also requires APR-UTIL path.

@MikeMcQuaid
Copy link
Member

Blocked on Homebrew/brew#1227.

@dunn
Copy link
Contributor

dunn commented Oct 19, 2016

@kubark42 now that Homebrew/brew#1227 is merged, can you try again and let us know if it still fails?

@dunn dunn added the needs response Needs a response from the issue/PR author label Oct 19, 2016
@kubark42
Copy link
Author

Identical APR could not be located error, alas.

Method: brew uninstall log4cxx, went to /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/ and did a hard reset, did a brew update, followed by brew install log4cxx

@BrewTestBot BrewTestBot removed the needs response Needs a response from the issue/PR author label Oct 19, 2016
@lvale
Copy link

lvale commented Oct 22, 2016

Also hanging on the same problem

Sparkle:ros_catkin_ws Luis$ brew install log4cxx
==> Using the sandbox
==> Downloading https://www.apache.org/dyn/closer.cgi?path=logging/log4cxx/0.10.0/apache-log4cxx-0.10.0.tar.gz
Already downloaded: /Users/Luis/Library/Caches/Homebrew/log4cxx-0.10.0.tar.gz
==> Downloading https://gist.githubusercontent.com/cawka/b4a79f6b883c46ac1672/raw/be8b4e610a1e21b34aaaf8fb4151362dcfb
Already downloaded: /Users/Luis/Library/Caches/Homebrew/log4cxx--patch-822c24f4eebd970aa284672eec2f71c6f8e192a85d78edb15a232c15011a52d4.patch
==> Downloading https://gist.githubusercontent.com/cawka/b4a79f6b883c46ac1672/raw/4188731bd771a961a91fcfbe561f3999b55
Already downloaded: /Users/Luis/Library/Caches/Homebrew/log4cxx--patch-eca194ec349b4925d0ad53d2b67c18b6a1aa7a979e7bd8729cfd1ed1ef4994c7.patch
==> Downloading https://gist.githubusercontent.com/cawka/b4a79f6b883c46ac1672/raw/f33998566cccf91fb84133e101f5a92a14b
Already downloaded: /Users/Luis/Library/Caches/Homebrew/log4cxx--patch-3eaf321e1df8e8e4a0a507a96646727180e7e721b2c42af22a5d40962d3dbecc.patch
==> Patching
==> Applying LOGCXX-400,LOGCXX-404---r1414037.patch
patching file src/main/cpp/objectoutputstream.cpp
patching file src/main/cpp/ndc.cpp
patching file src/main/cpp/loggingevent.cpp
patching file src/main/cpp/transcoder.cpp
patching file src/main/cpp/locationinfo.cpp
patching file src/main/include/log4cxx/helpers/simpledateformat.h
patching file src/main/include/log4cxx/helpers/object.h
patching file src/main/include/log4cxx/logstring.h
patching file pom.xml
==> Applying LOG4CXX-417---r1556413.patch
patching file src/main/cpp/stringhelper.cpp
Hunk #1 succeeded at 29 with fuzz 2 (offset -1 lines).
==> Applying LOGCXX-404---domtestcase.cpp.patch
patching file src/test/cpp/xml/domtestcase.cpp
==> ./autogen.sh
==> ./configure --prefix=/usr/local/Cellar/log4cxx/0.10.0 --disable-doxygen
Last 15 lines from /Users/Luis/Library/Logs/Homebrew/log4cxx/02.configure:
checking how to run the C++ preprocessor... clang++ -E
checking for ld used by clang++... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld... no
checking whether the clang++ linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes
checking for clang++ option to produce PIC... -fno-common -DPIC
checking if clang++ PIC flag -fno-common -DPIC works... yes
checking if clang++ static flag -static works... no
checking if clang++ supports -c -o file.o... yes
checking if clang++ supports -c -o file.o... (cached) yes
checking whether the clang++ linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin16.0.0 dyld
checking how to hardcode library paths into programs... immediate
checking how to run the C++ preprocessor... clang++ -E
checking for APR... no
configure: error: APR could not be located. Please use the --with-apr option.

READ THIS: https://git.io/brew-troubleshooting
If reporting this issue please do so at (not Homebrew/brew):
  https://github.com/Homebrew/homebrew-core/issues

These open issues may also help:
log4cxx build failure on macOS Sierra (OSX/macOS 10.12) https://github.com/Homebrew/homebrew-core/issues/5599

@lvale
Copy link

lvale commented Oct 22, 2016

Managed to overcome the issue following the advice to edit as mentioned above
#5599 (comment)

@kubark42
Copy link
Author

Confirmed fixed on my computer. Thanks!

@lloydc99 lloydc99 mentioned this issue Nov 17, 2016
3 tasks
@Homebrew Homebrew locked and limited conversation to collaborators May 4, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants