Mac OS X: "sudo make install" fails

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
Post Reply
User avatar
rocrail
Super wx Problem Solver
Super wx Problem Solver
Posts: 299
Joined: Fri Oct 02, 2009 2:02 pm
Contact:

Mac OS X: "sudo make install" fails

Post by rocrail »

I got a clean clone of the wxWidgets sources and configured it like this:

Code: Select all

../configure --enable-unicode --with-osx_cocoa --with-macosx-sdk=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk --with-macosx-version-min=10.6 --enable-graphics_ctx --enable-monolithic
Nothing special and I use this successfully before.

After a make I wanted to install the new build with "sudo make install", but unfortunately it fails:

Code: Select all

/Users/rob/tmp/wxWidgets/macbuild/change-install-names /usr/local/lib /usr/local/bin /usr/local/lib /Users/rob/tmp/wxWidgets/macbuild/lib
Usage: install_name_tool [-change old new] ... [-rpath old new] ... [-add_rpath new] ... [-delete_rpath old] ... [-id name] input
make: *** [install] Error 1
Any suggestions to make things install?
Best regards,
Rob.
https://wiki.rocrail.net
User avatar
rocrail
Super wx Problem Solver
Super wx Problem Solver
Posts: 299
Joined: Fri Oct 02, 2009 2:02 pm
Contact:

Re: Mac OS X: "sudo make install" fails

Post by rocrail »

There is a diff between the latest and a previous version:

New:

Code: Select all

change-install-names:    install_name_tool ${changes} -id ${3}/${i} ${1}/${i}
change-install-names:install_name_tool ${changes} ${2}/wxrc-3.0
Previous:

Code: Select all

change-install-names:    install_name_tool -id ${3}/${i} ${1}/${i}
change-install-names:        install_name_tool -change ${2}/${dep} ${3}/${dep} ${1}/${i}
I have no idea on how to solve this.
Mac OS X: 10.8.5
Best regards,
Rob.
https://wiki.rocrail.net
User avatar
doublemax
Moderator
Moderator
Posts: 19160
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Mac OS X: "sudo make install" fails

Post by doublemax »

As we don't have any OSX expert here, your chances of getting an answer are low. Try asking again on the mailing list.
Use the source, Luke!
stex
Earned a small fee
Earned a small fee
Posts: 15
Joined: Sun Sep 22, 2013 5:07 pm

Re: Mac OS X: "sudo make install" fails

Post by stex »

Hi,

It drove me nuts also, finally this worked for me:

Max OS X (10.7.5.) Intel CPU
wxWidgets 2.9.5
XCode from Apple (needed to get the GCC compiler up to date)

in the wxWidgets 2.9.5, create folder for build e.g. build-cocoa, then

Code: Select all

cd build-cocoa

../configure CFLAGS="-arch i386" CXXFLAGS="-arch i386" CPPFLAGS="-arch i386" LDFLAGS="-arch i386" OBJCFLAGS="-arch i386" OBJCXXFLAGS="-arch i386" --disable-unicode --disable-shared --with-opengl --enable-macosx_arch=i386 --with-cocoa --with-macosx-sdk=/Users/Administrator/Desktop/MacOSX10.6.sdk --with-macosx-version-min=10.6

sudo make

sudo make install
if you use code::blocks IDE and gcc compiler

Linker Flags:
-framework QTKit
-framework Quicktime
-framework CoreAudio
-framework AudioToolbox
-framework AudioUnit
-framework AppKit
-framework Carbon
-framework Cocoa
-framework IOKit
-framework System
-framework CoreMIDI

Static wx Libraries need to be linked "manually" - output of wx-config.

Hope this helps.

Stex

P.S. to get this runninh took me almost 2 weeks...
andreasstahl
In need of some credit
In need of some credit
Posts: 5
Joined: Wed Jan 09, 2013 10:04 am

Re: Mac OS X: "sudo make install" fails

Post by andreasstahl »

rocrail wrote:I got a clean clone of the wxWidgets sources and configured it like this:

Code: Select all

../configure --enable-unicode --with-osx_cocoa --with-macosx-sdk=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk --with-macosx-version-min=10.6 --enable-graphics_ctx --enable-monolithic
Nothing special and I use this successfully before.

After a make I wanted to install the new build with "sudo make install", but unfortunately it fails:

Code: Select all

/Users/rob/tmp/wxWidgets/macbuild/change-install-names /usr/local/lib /usr/local/bin /usr/local/lib /Users/rob/tmp/wxWidgets/macbuild/lib
Usage: install_name_tool [-change old new] ... [-rpath old new] ... [-add_rpath new] ... [-delete_rpath old] ... [-id name] input
make: *** [install] Error 1
Any suggestions to make things install?
I encounter the same symptoms on 3.0.0-RC1. The problem seems to be that the script that changes the install_names of the libraries wants to change the references to those dylibs in the wxrc-3.0 executable... which seems not to be built in wxWidgets > 2.9.4. (EDIT: see next post, it's skipped when using the --without-subdirs switch)

Short-term solution:
comment-out the last line in the ${OUTPUT_DIR}/change_install_name script:

Code: Select all

#!/bin/sh
libnames=`cd ${1} ; ls -1 | grep '\.[0-9][0-9]*\.dylib$'`
changes=''
for dep in ${libnames} ; do
    changes="${changes} -change ${4}/${dep} ${3}/${dep}"
done
for i in ${libnames} ; do
    install_name_tool ${changes} -id ${3}/${i} ${1}/${i}
done
# next line deactivated because wxrc-3.0 is not getting build and thus does not exist!
#install_name_tool ${changes} ${2}/wxrc-3.0
I'll investigate a bit further, then look into filing a bug report.
Last edited by andreasstahl on Thu Oct 17, 2013 8:46 am, edited 1 time in total.
andreasstahl
In need of some credit
In need of some credit
Posts: 5
Joined: Wed Jan 09, 2013 10:04 am

Re: Mac OS X: "sudo make install" fails

Post by andreasstahl »

I seem to have found the culprit in my case: It's the --without-subdirs configure switch. This keeps wxrc from being build, but is not considered in the install_name script. I have reopened the ticket #15551.
Post Reply