Opened 12 years ago

Last modified 11 years ago

#34177 new defect

port mpkg does no arch checking

Reported by: janne@… Owned by: macports-tickets@…
Priority: Normal Milestone: MacPorts Future
Component: base Version: 2.0.4
Keywords: Cc: jyrkiwahlstedt, ryandesign (Ryan Carsten Schmidt), cooljeanius (Eric Gallager)
Port:

Description (last modified by ryandesign (Ryan Carsten Schmidt))

I am running Mac os x lion 10.7.3, Xcode version 432 an MacPorts 2.0.4-10.7.

I'm building a mpkg for wine-devel 1.5.2 and the build goes fine.

Buildcmd:

$ sudo port mpkg wine-devel

Installation of the newly built mpkg on another host with the same OS without Xcode and MacPorts works fine too, but when running "wine cfg" it won't start and gives the following output:

Wine cannot find the FreeType font library.  To enable Wine to
use TrueType fonts please install a version of FreeType greater than
or equal to 2.0.5.
http://www.freetype.org
err:module:load_builtin_dll failed to load .so lib for builtin L"winex11.drv": dlopen(/opt/local/libexec/wine/../../lib/wine/winex11.drv.so, 258): Library not loaded: /opt/local/lib/libSM.6.dylib
  Referenced from: /opt/local/libexec/wine/../../lib/wine/winex11.drv.so
  Reason: no suitable image found.  Did find:
	/opt/local/lib/lib
err:module:load_builtin_dll failed to load .so lib for builtin L"winex11.drv": dlopen(/opt/local/libexec/wine/../../lib/wine/winex11.drv.so, 258): Library not loaded: /opt/local/lib/libSM.6.dylib
  Referenced from: /opt/local/libexec/wine/../../lib/wine/winex11.drv.so
  Reason: no suitable image found.  Did find:
	/opt/local/lib/lib
Wine cannot find the FreeType font library.  To enable Wine to
use TrueType fonts please install a version of FreeType greater than
or equal to 2.0.5.
http://www.freetype.org
err:module:load_builtin_dll failed to load .so lib for builtin L"winex11.drv": dlopen(/opt/local/libexec/wine/../../lib/wine/winex11.drv.so, 258): Library not loaded: /opt/local/lib/libSM.6.dylib
  Referenced from: /opt/local/libexec/wine/../../lib/wine/winex11.drv.so
  Reason: no suitable image found.  Did find:
	/opt/local/lib/lib
err:module:load_builtin_dll failed to load .so lib for builtin L"winex11.drv": dlopen(/opt/local/libexec/wine/../../lib/wine/winex11.drv.so, 258): Library not loaded: /opt/local/lib/libSM.6.dylib
  Referenced from: /opt/local/libexec/wine/../../lib/wine/winex11.drv.so
  Reason: no suitable image found.  Did find:
	/opt/local/lib/lib
Application tried to create a window, but no driver could be loaded.
Unknown error (127).
err:systray:initialize_systray Could not create tray window
Wine cannot find the FreeType font library.  To enable Wine to
use TrueType fonts please install a version of FreeType greater than
or equal to 2.0.5.
http://www.freetype.org
err:module:load_builtin_dll failed to load .so lib for builtin L"winex11.drv": dlopen(/opt/local/libexec/wine/../../lib/wine/winex11.drv.so, 258): Library not loaded: /opt/local/lib/libSM.6.dylib
  Referenced from: /opt/local/libexec/wine/../../lib/wine/winex11.drv.so
  Reason: no suitable image found.  Did find:
	/opt/local/lib/lib
err:module:load_builtin_dll failed to load .so lib for builtin L"winex11.drv": dlopen(/opt/local/libexec/wine/../../lib/wine/winex11.drv.so, 258): Library not loaded: /opt/local/lib/libSM.6.dylib
  Referenced from: /opt/local/libexec/wine/../../lib/wine/winex11.drv.so
  Reason: no suitable image found.  Did find:
	/opt/local/lib/lib
Wine cannot find the FreeType font library.  To enable Wine to
use TrueType fonts please install a version of FreeType greater than
or equal to 2.0.5.
http://www.freetype.org
err:module:load_builtin_dll failed to load .so lib for builtin L"winex11.drv": dlopen(/opt/local/libexec/wine/../../lib/wine/winex11.drv.so, 258): Library not loaded: /opt/local/lib/libSM.6.dylib
  Referenced from: /opt/local/libexec/wine/../../lib/wine/winex11.drv.so
  Reason: no suitable image found.  Did find:
	/opt/local/lib/lib
err:module:load_builtin_dll failed to load .so lib for builtin L"winex11.drv": dlopen(/opt/local/libexec/wine/../../lib/wine/winex11.drv.so, 258): Library not loaded: /opt/local/lib/libSM.6.dylib
  Referenced from: /opt/local/libexec/wine/../../lib/wine/winex11.drv.so
  Reason: no suitable image found.  Did find:
	/opt/local/lib/lib
Application tried to create a window, but no driver could be loaded.
Unknown error (127).

Am I doing something wrong ?

Attachments (1)

sudo-port-mpkg-wine-devel.txt (65.5 KB) - added by ryandesign (Ryan Carsten Schmidt) 12 years ago.

Download all attachments as: .zip

Change History (13)

comment:1 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: jwa@… added
Description: modified (diff)
Keywords: wine-devel removed
Owner: changed from macports-tickets@… to ryandesign@…

So wine-devel works on the computer you built it on, but then taking that package to another computer without Xcode and installing it there produces the error messages above?

The first thing it says is wrong is that /opt/local/lib/libSM.6.dylib doesn't exist. Does it? wine-devel declares a dependency on the xorg-libsm port; is that port also installed on that second computer?

comment:2 in reply to:  1 Changed 12 years ago by janne@…

Replying to ryandesign@…:

So wine-devel works on the computer you built it on, but then taking that package to another computer without Xcode and installing it there produces the error messages above?

The first thing it says is wrong is that /opt/local/lib/libSM.6.dylib doesn't exist. Does it? wine-devel declares a dependency on the xorg-libsm port; is that port also installed on that second computer?


On the computer where the wine-devel*.mpkg is built wine-devel is installed with:

$ sudo port install wine-devel

which is working fine.

On the other computer the wine-devel*.mpkg is installed and gives the errors.

/opt/local/lib/libSM.6.dylib does exist and xorg-libsm is installed,
it's included in the wine-devel*.mpkg.
I've tried with the port wine @1.4 (mpkg) too, but it gives the same errors.

comment:3 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

I can't explain why wine would exit complaining that /opt/local/lib/libSM.6.dylib does not exist, when it does in fact exist. Maybe that's not what it's complaining about then. I'm also unsure what to make of:

  Reason: no suitable image found.  Did find:
	/opt/local/lib/lib

Usually the "Did find:" line lists the name of an actual library that it did find but which was unsuitable for some reason. But /opt/local/lib/lib is not a library. At least I assume there is no file or directory /opt/local/lib/lib on either of your systems?

comment:4 in reply to:  3 ; Changed 12 years ago by janne@…

Replying to ryandesign@…:

I can't explain why wine would exit complaining that /opt/local/lib/libSM.6.dylib does not exist, when it does in fact exist. Maybe that's not what it's complaining about then. I'm also unsure what to make of:

  Reason: no suitable image found.  Did find:
	/opt/local/lib/lib

Usually the "Did find:" line lists the name of an actual library that it did find but which was unsuitable for some reason. But /opt/local/lib/lib is not a library. At least I assume there is no file or directory /opt/local/lib/lib on either of your systems?


That's right no file or directory named /opt/local/lib/lib

$ ls -l /opt/local/lib/lib
ls: /opt/local/lib/lib: No such file or directory

Checked both computers.

comment:5 in reply to:  4 ; Changed 12 years ago by janne@…

Replying to janne@…:

Replying to ryandesign@…:

I can't explain why wine would exit complaining that /opt/local/lib/libSM.6.dylib does not exist, when it does in fact exist. Maybe that's not what it's complaining about then. I'm also unsure what to make of:

  Reason: no suitable image found.  Did find:
	/opt/local/lib/lib

Usually the "Did find:" line lists the name of an actual library that it did find but which was unsuitable for some reason. But /opt/local/lib/lib is not a library. At least I assume there is no file or directory /opt/local/lib/lib on either of your systems?


That's right no file or directory named /opt/local/lib/lib

$ ls -l /opt/local/lib/lib
ls: /opt/local/lib/lib: No such file or directory

Checked both computers.

O.K. I think I've found the problem.
On the computer where wine-devel is installed with: sudo port install wine-devel all is built with variant +universal,
but the wine-devel*.mpkg is built for x86_64 only.

First computer:

$ file /opt/local/lib/libSM.6.dylib 
/opt/local/lib/libSM.6.dylib: Mach-O universal binary with 2 architectures
/opt/local/lib/libSM.6.dylib (for architecture x86_64):	Mach-O 64-bit dynamically linked shared library x86_64
/opt/local/lib/libSM.6.dylib (for architecture i386):	Mach-O dynamically linked shared library i386


Second computer:

file /opt/local/lib/libSM.6.dylib
/opt/local/lib/libSM.6.dylib: Mach-O 64-bit dynamically linked shared library x86_64


wine can only be compiled as 32bit, so it wont work with 64bits librarys.

So the question now is:
How do I build an mpkg with the variant +universal ?

comment:6 in reply to:  5 ; Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to janne@…:

O.K. I think I've found the problem.
On the computer where wine-devel is installed with: sudo port install wine-devel all is built with variant +universal,
but the wine-devel*.mpkg is built for x86_64 only.

You mean i386 only. Wine cannot be built for x86_64 yet.

So the question now is:
How do I build an mpkg with the variant +universal ?

I thought "sudo port mpkg" would include the necessary variant selections. There was a bug about that not too long ago (#27231), but it was fixed in MacPorts 2.0.0.

comment:7 in reply to:  6 ; Changed 12 years ago by janne@…

Replying to ryandesign@…:

Replying to janne@…:

O.K. I think I've found the problem.
On the computer where wine-devel is installed with: sudo port install wine-devel all is built with variant +universal,
but the wine-devel*.mpkg is built for x86_64 only.

You mean i386 only. Wine cannot be built for x86_64 yet.

So the question now is:
How do I build an mpkg with the variant +universal ?

I thought "sudo port mpkg" would include the necessary variant selections. There was a bug about that not too long ago (#27231), but it was fixed in MacPorts 2.0.0.

Yes, sorry, I meant i386.
Well it doesn't look like it's been fixed. It's behaving just as described in Ticket #27231.
I'll try to work around it, but if someone have a solution I'm interested.

comment:8 in reply to:  7 Changed 12 years ago by janne@…

Replying to janne@…:

Replying to ryandesign@…:

Replying to janne@…:

O.K. I think I've found the problem.
On the computer where wine-devel is installed with: sudo port install wine-devel all is built with variant +universal,
but the wine-devel*.mpkg is built for x86_64 only.

You mean i386 only. Wine cannot be built for x86_64 yet.

So the question now is:
How do I build an mpkg with the variant +universal ?

I thought "sudo port mpkg" would include the necessary variant selections. There was a bug about that not too long ago (#27231), but it was fixed in MacPorts 2.0.0.

Yes, sorry, I meant i386.
Well it doesn't look like it's been fixed. It's behaving just as described in Ticket #27231.
I'll try to work around it, but if someone have a solution I'm interested.

Correction. I meant that the packages inside wine-devel*.mpkg are compiled for x86_64 and wine is compiled as i386.

Anyway, I've made a workaround if someone is interested.
As I've allready created wine-devel*.mpkg before I saved it to another location.
Created a list of all packages included in the mpkg, then did:

$ for i in `cat list.txt`; do sudo port clean --all $i; done


Checked that "/opt/local/var/macports/build" was empty.

Then:

$ for i in `cat list.txt`; do sudo port pkg $i +universal; done


$ cd /Users/username/dir/wine-devel-1.5.2.mpkg/Contents/Packages
$ rm -fr ./*
$ cd /opt/local/var/macports/build
$ find . -type d -name "*.pkg" -exec cp -R {} /Users/username/dir/wine-devel-1.5.2.mpkg/Contents/Packages \;


Installed wine-devel-1.5.2.mpkg on the other computer and it works fine now.
I'll take a coffe break now.

Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

comment:9 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… added
Component: portsbase
Milestone: MacPorts Future
Owner: changed from ryandesign@… to macports-tickets@…
Port: wine-devel removed
Summary: wine-devel @1.5.2 run errorport mpkg rebuilds dependencies without universal variant

Ok, I can confirm this problem, with both MacPorts 2.0.4 and the latest (post-2.1.0-beta-1) code from the 2.1 branch. I've attached a transcript from a clean MacPorts prefix with no ports installed. Up until line 1212 of the transcript, it installs all the ports that need it with the +universal variant, as expected, then it builds and stages wine-devel itself, and then as it's preparing the mpkg, it rebuilds every port without the universal variant, which of course it shouldn't be doing. I guess the important difference from #27231 is that there we were talking about a variant that was explicitly requested on a port, whereas here, we're talking about a variant that was automatically chosen by MacPorts.

comment:10 Changed 12 years ago by jmroot (Joshua Root)

Summary: port mpkg rebuilds dependencies without universal variantport mpkg does no arch checking

#27231 was variants not being passed on to the dependencies, it wasn't specifically about universal. It's correct for mpkg to rebuild dependencies if you ask for different variants than you have installed; the issue here is just that it has its own dependency code that doesn't check the archs and re-open the mports with +universal if needed.

comment:11 in reply to:  10 Changed 12 years ago by janne@…

Replying to jmr@…:

#27231 was variants not being passed on to the dependencies, it wasn't specifically about universal. It's correct for mpkg to rebuild dependencies if you ask for different variants than you have installed; the issue here is just that it has its own dependency code that doesn't check the archs and re-open the mports with +universal if needed.

I've upgraded MacPorts to version 2.1.1 and tried to build a mpkg for
wine-devel @ 1.5.5 and it is still the same problem.
With MacPorts 2.1.1 the pkg and mpkg's are built as xar files
and my workaround does no longer work.
Does anyone have a solution for this/tell me if I'm doing something wrong ?

comment:12 Changed 11 years ago by cooljeanius (Eric Gallager)

Cc: egall@… added

Cc Me!

Note: See TracTickets for help on using tickets.