Opened 11 months ago

Last modified 10 months ago

#15551 reopened defect

Mac OS X install_name_tool fails if wxrc was not build

Reported by: rocrail Owned by:
Priority: low Milestone:
Component: build Version: stable-latest
Keywords: install_name_tool Cc:
Blocked By: Blocking:
Patch: no

Description

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

[code]../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-monolithiccode
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]/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 1code

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

New:
[code]change-install-names: install_name_tool ${changes} -id ${3}/${i} ${1}/${i}
change-install-names:install_name_tool ${changes} ${2}/wxrc-3.0
code

Previous:
[code]change-install-names: install_name_tool -id ${3}/${i} ${1}/${i}
change-install-names: install_name_tool -change ${2}/${dep} ${3}/${dep} ${1}/${i}
code

I have no idea on how to solve this.
Mac OS X: 10.8.5

Change History (10)

comment:1 Changed 11 months ago by rocrail

  • Priority changed from normal to blocker

comment:2 Changed 11 months ago by VZ

  • Resolution set to fixed
  • Status changed from new to closed

(In [74921]) Fix install_name_tool calls in OS X "make install".

Unfortunately the changes of r74909 (see #15452) don't seem to have been
tested and broke "make install" completely as libraries were not found in the
"bin" directory where the script was looking for them. Fix it to use "lib"
subdirectory as intended.

Closes #15551.

comment:3 Changed 11 months ago by rocrail

Tnx.
A small example would helpful because I do not understand your statement:
"Fix it to use "lib" subdirectory as intended."

comment:4 Changed 11 months ago by rocrail

  • Resolution fixed deleted
  • Status changed from closed to reopened

comment:5 Changed 11 months ago by vadz

  • Status changed from reopened to infoneeded_new

Sorry, example of what? "make install" should work now (I tested it and it worked for me), the "lib directory" just describes the fix.

comment:6 Changed 11 months ago by rocrail

If I issue:
sudo make install
it fails:

/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

You wrote:
"the "lib directory" just describes the fix"
Fine, but it does nor help me much because I can not translate this statement in a usable fix for the reported problem.

Please rerport which parameter I must add or change to make it install again.

comment:7 Changed 11 months ago by vadz

Did you update to the latest svn revision? I.e. do you have the changes of r74921 in your local tree?

comment:8 Changed 11 months ago by rocrail

  • Resolution set to fixed
  • Status changed from infoneeded_new to closed

comment:9 Changed 10 months ago by andreasstahl

  • Resolution fixed deleted
  • Status changed from closed to reopened

I can confirm that the bug still exists when using the --without-subdirs switch.
I encountered this is in 3.0.0-rc1 and svn trunk as of r75018

The --without-subdirs switch seems to prevent make from building wxrc, which I think is correct behaviour, but that is not reflected when generating the change_install_names script. The script assumes wxrc exists and has been copied to the install dir, and so it fails on the last line, if the --without-subdirs switch was set during configure.

I tested this on OS X 10.7 (Lion), using latest Xcode tools available,
gcc --version: i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)

Steps to reproduce:

svn co http://svn.wxwidgets.org/svn/wx/wxWidgets/trunk wxWidgets
cd wxWidgets
mkdir out
cd out
../configure --prefix=/Users/YOUR_NAME/wx_dist --without-subdirs
make
make install

...
install_name_tool: can't open file: /Users/YOUR_NAME/wx_dist/bin/wxrc-3.0 (No such file or directory)

comment:10 Changed 10 months ago by vadz

  • Milestone 3.0 deleted
  • Priority changed from blocker to low
  • Summary changed from Mac OS X install_name_tool fails. to Mac OS X install_name_tool fails if wxrc was not build

As much as I like using --without-subdirs myself for the quick test builds, I really don't think it's a good idea to use it with make install as wxrc should be installed as part of wxWidgets. So for me the answer here is simply: don't do this.

If, however, you feel like making a trivial patch adding a if [ -f $2/wxrc-${WX_RELEASE} ] check to the shell script generated by configure and fixing this problem, we could still apply it, of course.

Note: See TracTickets for help on using tickets.