Ask Your Question
0

Failed to install log4cxx! (homebrew osx 10.6.8)

asked 2012-03-07 12:09:38 -0500

anonymous user

Anonymous

updated 2014-04-20 14:06:44 -0500

ngrennan gravatar image

Trying to run the command: rosinstall ~/ros "http://packages.ros.org/cgi-bin/gen_rosinstall.py?rosdistro=electric&variant=desktop-full&overlay=no"

But I am getting the error: "Failed to install log4cxx! [ rosmake ] rosdep install failed: Rosdep install failed"

Traceback (most recent call last): File "/usr/local/bin/rosinstall", line 5, in <module> pkg_resources.run_script('rosinstall==0.5.29', 'rosinstall') File "/Library/Python/2.6/site-packages/setuptools-0.6c11-py2.6.egg/pkg_resources.py", line 489, in run_script

File "/Library/Python/2.6/site-packages/setuptools-0.6c11-py2.6.egg/pkg_resources.py", line 1214, in run_script self.egg_info = os.path.join(path, 'EGG-INFO') File "/Library/Python/2.6/site-packages/rosinstall-0.5.29-py2.6.egg/EGG-INFO/scripts/rosinstall", line 764, in <module>

File "/Library/Python/2.6/site-packages/rosinstall-0.5.29-py2.6.egg/EGG-INFO/scripts/rosinstall", line 754, in rosinstall_main

File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/subprocess.py", line 462, in check_call

edit retag flag offensive close merge delete

Comments

Tried installing it manually get the errors:

make[2]: * [install-recursive] Error 1 make[1]: [install-recursive] Error 1 make: ** [install-recursive] Error 1 ==> Exit Status: 2 http://github.com/mxcl/homebrew/blob/master/Library/Formula/log4cxx.rb#L24 . Error: Failed executing: make install

heyfred gravatar imageheyfred ( 2012-03-08 07:35:22 -0500 )edit

There may be something bigger wrong with log4cxx, as it seems to fail on macports as well: http://answers.ros.org/question/11114/port-install-of-log4cxx-failes-on-mac-osx-106

mjcarroll gravatar imagemjcarroll ( 2012-03-08 10:40:18 -0500 )edit

After trying the removing the subversion folder im still getting the error: #<BuildError: Failed executing: make install > Homebrew will abort. The installation prefix is: /usr/local/Cellar/log4cxx/0.10.0

heyfred gravatar imageheyfred ( 2012-03-09 05:40:42 -0500 )edit

/github.com/ros/com?mon_tutorials.gitMar 9'12

Adrian Dittrich gravatar imageAdrian Dittrich ( 2013-09-07 19:41:53 -0500 )edit

heyfred ( Mar 9'12 )

Adrian Dittrich gravatar imageAdrian Dittrich ( 2013-09-07 19:47:15 -0500 )edit

3 Answers

Sort by ยป oldest newest most voted
1

answered 2012-03-08 18:01:21 -0500

bblodget gravatar image

I ran into the same problem using OS X 10.7.3. To get more information I ran

brew install -v log4cxx

and saw the error:

...
-I/opt/subversion/include/apr-1 -I/opt/subversion/include -Os -w -pipe -march=native -Qunused-arguments -c objectptr.cpp  -fno-common -DPIC -o .libs/objectptr.o

objectptr.cpp:41:27: error: cast from pointer to smaller type 'apr_uint32_t' (aka 'unsigned int')
      loses information
                          (apr_uint32_t) newValue);
                          ^~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

The problem is it is trying to cast a void* to a apr_uint32_t. This would work find on a 32-bit machine but I am running on a 64-bit machine so void* is 64 bits.

I read this old post and concluded that the most likely cause is ARP, on my machine, was compiled as a 32-bit app and log4cxx is being built as a 64-bit app.

Looking at the error message above I see it is looking in the wrong place for the ARP includes. It is finding them in "-I/opt/subversion/include/apr-1" when it should be "-I/usr/include/apr-1".

The solution in my case was to remove the directory /opt/subversion and re-run "brew install -v log4cxx" in a new terminal.

edit flag offensive delete link more

Comments

Do you know what is generating the /opt/subversion directory? I don't believe that I have that.

mjcarroll gravatar imagemjcarroll ( 2012-03-09 04:26:15 -0500 )edit

I had an old version of subversion in my opt directory that I installed a long time ago. Many programs use APR. I suggest running "brew install -v log4cxx 2>&1 | tee -a log.txt" and then search the log.txt file for "include/apr". This will show you the path to the APR library it is using.

bblodget gravatar imagebblodget ( 2012-03-09 07:23:10 -0500 )edit
1

answered 2012-03-07 13:22:23 -0500

Kevin gravatar image

Did you try installing it manually?

brew update

brew install log4cxx
edit flag offensive delete link more

Comments

(Mar 8 '12)

Adrian Dittrich gravatar imageAdrian Dittrich ( 2013-09-07 19:52:27 -0500 )edit

(Aug 30 '13)

Adrian Dittrich gravatar imageAdrian Dittrich ( 2013-09-07 19:53:47 -0500 )edit

Aug 30 '13

Adrian Dittrich gravatar imageAdrian Dittrich ( 2013-09-07 19:54:44 -0500 )edit

(Mai 8 '12)

Adrian Dittrich gravatar imageAdrian Dittrich ( 2013-09-07 19:56:37 -0500 )edit

(Jun 8 '12)

Adrian Dittrich gravatar imageAdrian Dittrich ( 2013-09-07 19:57:44 -0500 )edit

(Juni 8 '12)

Adrian Dittrich gravatar imageAdrian Dittrich ( 2013-09-07 19:58:33 -0500 )edit
0

answered 2013-08-30 09:48:58 -0500

vchu gravatar image

If removing subversion folder didn't fix the problem or you didn't have a subversion folder to begin with... I found that you can give homebrew a flag that might fix the problem:

Basically try installing using this command

brew install -vd --use-llvm --universal log4cxx

I believe you really only need --use-llvm, but I know that the previous command worked for me.

edit flag offensive delete link more

Comments

Found from another website specific to mac and homebrew: `https://github.com/mxcl/homebrew/issues/12127` (couldn't post in answer because of karma....)

vchu gravatar imagevchu ( 2013-08-30 09:51:08 -0500 )edit

(Sep 30 '13)

Adrian Dittrich gravatar imageAdrian Dittrich ( 2013-09-07 20:00:59 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2012-03-07 12:09:38 -0500

Seen: 1,683 times

Last updated: Aug 30 '13