New Ticket     Tickets     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Ticket #15995 (closed defect: fixed)

Opened 6 years ago

Last modified 6 years ago

Installation of lame-3.98 +universal fails to build

Reported by: tobiasmatzat@… Owned by: ram@…
Priority: Normal Milestone:
Component: ports Version: 1.6.0
Keywords: lame Cc: hvdwolf@…
Port:

Description

Here is the error message:

dummy:~ admin$ sudo port install lame +universal
---> Fetching lame
---> Verifying checksum(s) for lame
---> Extracting lame
---> Configuring lame
---> Building lame with target all
Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_audio_lame/work/lame-398" && make all " returned error 2
Command output: xmm_quantize_sub.c:42: error: syntax error before '}' token
xmm_quantize_sub.c:42: warning: type defaults to 'int' in declaration of 'vecfloat_union'
xmm_quantize_sub.c:42: warning: data definition has no type or storage class
xmm_quantize_sub.c: In function 'init_xrpow_core_sse':
xmm_quantize_sub.c:55: error: nested functions are disabled, use -fnested-functions to re-enable
xmm_quantize_sub.c:55: error: syntax error before 'vec_fabs_mask'
xmm_quantize_sub.c:59: warning: implicit declaration of function '_mm_prefetch'
xmm_quantize_sub.c:59: error: '_MM_HINT_T0' undeclared (first use in this function)
xmm_quantize_sub.c:59: error: (Each undeclared identifier is reported only once
xmm_quantize_sub.c:59: error: for each function it appears in.)
xmm_quantize_sub.c:62: error: 'vec_xrpow_max' undeclared (first use in this function)
xmm_quantize_sub.c:62: warning: implicit declaration of function '_mm_set_ps1'
xmm_quantize_sub.c:63: error: 'vec_sum' undeclared (first use in this function)
xmm_quantize_sub.c:66: error: 'm128' undeclared (first use in this function)
xmm_quantize_sub.c:66: error: syntax error before 'vec_tmp'
xmm_quantize_sub.c:68: error: 'vec_tmp' undeclared (first use in this function)
xmm_quantize_sub.c:68: warning: implicit declaration of function '_mm_loadu_ps'
xmm_quantize_sub.c:69: warning: implicit declaration of function '_mm_and_ps'
xmm_quantize_sub.c:69: error: 'vec_fabs_mask' undeclared (first use in this function)
xmm_quantize_sub.c:71: warning: implicit declaration of function '_mm_add_ps'
xmm_quantize_sub.c:73: warning: implicit declaration of function '_mm_sqrt_ps'
xmm_quantize_sub.c:73: warning: implicit declaration of function '_mm_mul_ps'
xmm_quantize_sub.c:75: warning: implicit declaration of function '_mm_storeu_ps'
xmm_quantize_sub.c:77: warning: implicit declaration of function '_mm_max_ps'
xmm_quantize_sub.c:54: warning: unused variable 'fabs_mask'

lipo: can't figure out the architecture type of: /var/tmpccvMlQXM.out
make[3]: * [xmm_quantize_sub.lo] Error 1
make[2]:
* [all-recursive] Error 1
make[1]: * [all-recursive] Error 1
make:
* [all] Error 2

Error: Status 1 encountered during processing.

Attachments

config.log (84.2 KB) - added by tobiasmatzat@… 6 years ago.
Portfile-lame.diff (2.3 KB) - added by hvdwolf@… 6 years ago.
patch for lame 3.98 portfile to build universal version
lame-universal.log (113.0 KB) - added by ram@… 6 years ago.
build log
Portfile (3.4 KB) - added by hvdwolf@… 6 years ago.
Update Portfile for universal build of lame 3.98

Change History

Changed 6 years ago by tobiasmatzat@…

comment:1 Changed 6 years ago by ram@…

  • Status changed from new to assigned
  • Owner changed from macports-tickets@… to ram@…
  • Milestone set to Port Bugs

comment:2 follow-up: ↓ 3 Changed 6 years ago by ram@…

are the universal variants of the dependencies (ncurses and ncursesw) installed?

comment:3 in reply to: ↑ 2 Changed 6 years ago by tobiasmatzat@…

Replying to ram@macports.org:

are the universal variants of the dependencies (ncurses and ncursesw) installed?

Yes, they are. I just did a fresh macports install with enabled +universal

comment:4 Changed 6 years ago by ram@…

Just to keep you posted; I've managed to fix one of the errors, but not the others. What's making matters more complicated is that I'm getting extra errors when trying to do this outside of the MacPorts infrastructure in order for me to report this issue upstream.

Changed 6 years ago by hvdwolf@…

patch for lame 3.98 portfile to build universal version

comment:5 follow-up: ↓ 7 Changed 6 years ago by hvdwolf@…

Please find attached a patch file to enable the build of xvid with the universal variant. You need to build it in two steps as the configuration on Intel takes SSE optimalisation itno account which prevents the ppc build. When split into two steps it builds correctly when the configure setting CC="gcc -arch <architecture>" is set.

Harry

comment:6 Changed 6 years ago by hvdwolf@…

I mentioned "the build of xvid". This is off course nonsense. It really is a patch for lame 3.98.

(xvid doesn't compile either universally and needs about the same setup and ppc should be enhanced with altivec, but that's another story and not completely finished yet.)

comment:7 in reply to: ↑ 5 Changed 6 years ago by ram@…

Replying to hvdwolf@gmail.com:

Please find attached a patch file to enable the build of xvid with the universal variant. You need to build it in two steps as the configuration on Intel takes SSE optimalisation itno account which prevents the ppc build. When split into two steps it builds correctly when the configure setting CC="gcc -arch <architecture>" is set.

Thanks for the patch, although I'm not completely convinced this is the correct way to go. I feel that this, using lipo to stitch together the universal binary, should be part of base. Although as there is nothing available at the moment this may be the only option for the time being. Let me do some testing.

comment:8 Changed 6 years ago by ram@…

  • Cc hvdwolf@… added

There's a typo in the patch, in the configure stage when you set my_cflags, there is a missing $ in the library path. Also when building this is don't seem to work for me:

$ file /opt/local/bin/lame
/opt/local/bin/lame: Mach-O executable i386
$

I've attached the output of:

$ sudo port -d install +universal &> lame-universal.log &

Changed 6 years ago by ram@…

build log

comment:9 follow-ups: ↓ 10 ↓ 12 Changed 6 years ago by hvdwolf@…

Sorry for the typo. That was very sloppy (as was my initial xvid reference).

I just checked and you are right. The script is not good enough yet. Yesterday when testing I stayed in the "/opt/local/var/macports/sources/rsync.macports.org/release/ports/audio/lame" directory to be able to modify the Portfile immediately. From this location the script works, from any other location it doesn't. I obviously need to make better reference to the workpath but I couldn't see the error at first glance this morning.

I can see from your log that you are on Leopard (Environment: MACOSX_DEPLOYMENT_TARGET='10.5' and /Developer/SDKs/MacOSX10.5.sdk). I'm (still) on 10.4.11, but I will test tonight with Leopard on another system (if I can lay my hands on it, otherwise it will be a little later.) I need to check if it will also run on Leopard.

You mention as command: "$ sudo port -d install +universal &> lame-universal.log &" where I expected: "$ sudo port -d install lame +universal &> lame-universal.log &"

Is this some port option so that port knows what port/Portfile to choose based on ??? or is it a typo?

comment:10 in reply to: ↑ 9 Changed 6 years ago by ram@…

Replying to hvdwolf@gmail.com:

You mention as command: "$ sudo port -d install +universal &> lame-universal.log &" where I expected: "$ sudo port -d install lame +universal &> lame-universal.log &"

Is this some port option so that port knows what port/Portfile to choose based on ??? or is it a typo?

I just ran the command from the directory where I had the patched Portfile, so port automatically used that.

comment:11 Changed 6 years ago by ram@…

disabled universal variant, in r39372, until a working solution can be found

comment:12 in reply to: ↑ 9 Changed 6 years ago by ram@…

Replying to hvdwolf@gmail.com:

I'm (still) on 10.4.11, but I will test tonight with Leopard on another system (if I can lay my hands on it, otherwise it will be a little later.) I need to check if it will also run on Leopard.

Any news?

comment:13 Changed 6 years ago by hvdwolf@…

I'm very sorry that I did not give any feedback any sooner. Almost immediately after my previous mail I had some disturbing news in my family which took quite some time. Last week I was very busy with two packages (hugin and avidemux) where I'm the osx maintainer for. But I should have answered earlier. I have attached a new Portfile which works for me on both Tiger and Leopard. Please test.

comment:14 Changed 6 years ago by ram@…

Thanks for the update, testing it now.

comment:15 Changed 6 years ago by ram@…

Still only showing the i386 architecture for me again:

[ram@cizin lame]$ port installed lame
The following ports are currently installed:
  lame @3.98_0+universal (active)
[ram@cizin lame]$ file /opt/local/bin/lame
/opt/local/bin/lame: Mach-O executable i386
[ram@cizin lame]$ 

Changed 6 years ago by hvdwolf@…

Update Portfile for universal build of lame 3.98

comment:16 Changed 6 years ago by hvdwolf@…

....And sorry again. I feel very stupid. I only looked at the .dylib and .a library. I never looked at the lame binary. In your previous post you already mentioned it but I only looked at the "i386 file" statement and just assumed it was the lib (without really looking at the line which actually mentions execatable i386). I updated the Portfile to correctly lipo merge the lame binary also. I attached and replaced the Portfile.

Please test and check libs and binary with either "file" or "lipo -info"

comment:17 Changed 6 years ago by ram@…

Looks like success!

$ lipo -info /opt/local/bin/lame
Architectures in the fat file: /opt/local/bin/lame are: i386 ppc7400
$ lipo -info /opt/local/lib/libmp3lame.a
Architectures in the fat file: /opt/local/lib/libmp3lame.a are: i386 ppc7400
$ lipo -info /opt/local/lib/libmp3lame.dylib
Architectures in the fat file: /opt/local/lib/libmp3lame.dylib are: i386 ppc7400
$

Thanks for fixing this problem. I'll get it committed ASAP.

comment:18 Changed 6 years ago by ram@…

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

Committed in r39490, thanks!

comment:19 Changed 6 years ago by anonymous

  • Milestone Port Bugs deleted

Milestone Port Bugs deleted

Note: See TracTickets for help on using tickets.