Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#25815 closed defect (fixed)

libvpx 0.9.1_0 fails to build

Reported by: manphiz@… Owned by: raimue (Rainer Müller)
Priority: Normal Milestone:
Component: ports Version: 1.9.1
Keywords: Cc: raimue (Rainer Müller), bgrupe27, MartinBuchmann (Martin Buchmann), sck-nogas (Scott C. Kennedy), josh@…, ryandesign (Ryan Carsten Schmidt), eregontp@…, bayonne, jiminaus@…, boydb@…, dershow, sewebster@…
Port: libvpx

Description

Building libvpx fails. The building log and the patch are attached.

Attachments (8)

main.log (17.0 KB) - added by manphiz@… 14 years ago.
building log
libvpx_build_patch.diff (307 bytes) - added by manphiz@… 14 years ago.
Adding "build.cmd make" fixes the problem
log_orig.txt (15.9 KB) - added by jwhowse4 14 years ago.
Log for original Portfile
log_new_1.txt (15.9 KB) - added by jwhowse4 14 years ago.
Log for Portfile with 'build.cmd make' added
log_new_2.txt (15.9 KB) - added by jwhowse4 14 years ago.
Log for Portfile with 'build.cmd gmake' added
main.2.log (190.7 KB) - added by eregontp@… 14 years ago.
Build log after 'selfupdate'
main.3.log (189.5 KB) - added by manphiz@… 14 years ago.
build log with verbose=1. Unfortunately no extra information as well.
patch-configure.sh.diff (561 bytes) - added by royliu@… 14 years ago.
The configure.sh patch with sed line terminators.

Download all attachments as: .zip

Change History (45)

Changed 14 years ago by manphiz@…

Attachment: main.log added

building log

Changed 14 years ago by manphiz@…

Attachment: libvpx_build_patch.diff added

Adding "build.cmd make" fixes the problem

comment:1 Changed 14 years ago by jmroot (Joshua Root)

Cc: raimue@… added; nomaintainer@… removed

It's pointless to cc nomaintainer, as mentioned in the ticket guidelines.

Why would this help? Do you have a 'make' other than /usr/bin/make installed?

comment:2 Changed 14 years ago by jmroot (Joshua Root)

Works for me as is, FWIW.

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

Works for me too as-is. Don't think setting build.cmd to make will help since make is already the default for build.cmd.

comment:4 Changed 14 years ago by manphiz@…

Then it's something weird on my system. which make shows /usr/bin/make as well, but it fails when using /usr/bin/make but plain "make" succeeded. Is it possible that the macports is changing $PATH somewhere? Any information I should provided to debug this?

comment:5 in reply to:  4 Changed 14 years ago by raimue (Rainer Müller)

I can't reproduce this.

Replying to manphiz@…:

Then it's something weird on my system. which make shows /usr/bin/make as well, but it fails when using /usr/bin/make but plain "make" succeeded. Is it possible that the macports is changing $PATH somewhere? Any information I should provided to debug this?

MacPorts does indeed change the PATH while running some phases to ${prefix}/bin:${prefix}/sbin:/bin:/sbin:/usr/bin:/usr/sbin.

Take a look at a log with your changes applied (run sudo port clean && sudo port build to keep the full log) and see which make it is using. According to your first log it was using /usr/bin/make, which works fine for me.

comment:6 Changed 14 years ago by jwhowse4

On an intel mac running snow leopard 10.6.4 and xcode 3.2.3 I get build failure with exactly the same error as the original poster. However, in my case adding the line 'build.cmd make' to the Portfile does not fix the problem. Just for fun I also tried 'build.cmd gmake' and this fails as well. Attached are 3 log files for my various attempts.

Changed 14 years ago by jwhowse4

Attachment: log_orig.txt added

Log for original Portfile

Changed 14 years ago by jwhowse4

Attachment: log_new_1.txt added

Log for Portfile with 'build.cmd make' added

Changed 14 years ago by jwhowse4

Attachment: log_new_2.txt added

Log for Portfile with 'build.cmd gmake' added

comment:7 Changed 14 years ago by SlaunchaMan (Jeff Kelley)

I'm having similar errors; my logfile looks just like jwhowse's.

comment:8 Changed 14 years ago by raimue (Rainer Müller)

Owner: changed from macports-tickets@… to raimue@…
Status: newassigned

There is an existing bug report upstream. I am unable to verify if the advice about the sed command in fmt_deps works.

comment:9 Changed 14 years ago by ajb78@…

I am also having this problem. Unfortunately the fmt_deps advice did not work for me - is it possible to rollback the port to the previous working version?

comment:10 in reply to:  9 Changed 14 years ago by ajb78@…

Replying to ajb78@…:

I am also having this problem. Unfortunately the fmt_deps advice did not work for me - is it possible to rollback the port to the previous working version?

I realized that I just needed to downgrade ffmpeg to remove the libvpx dependency. I still have the compile problem.

comment:11 in reply to:  6 ; Changed 14 years ago by manphiz@…

Replying to jwhowse4@…:

On an intel mac running snow leopard 10.6.4 and xcode 3.2.3 I get build failure with exactly the same error as the original poster. However, in my case adding the line 'build.cmd make' to the Portfile does not fix the problem. Just for fun I also tried 'build.cmd gmake' and this fails as well. Attached are 3 log files for my various attempts.

I have the exact system settings(snow leopard 10.6.4, xcode 3.2.3, gcc version 4.2.1 (Apple Inc. build 5664)). If just changing build.cmd doesn't help, maybe try suppress build.args with empty, which is -j2 by default.

comment:12 Changed 14 years ago by bgrupe27

Cc: bgrupe@… added

Cc Me!

comment:13 Changed 14 years ago by MartinBuchmann (Martin Buchmann)

Cc: Martin.Buchmann@… added

Cc Me!

comment:14 Changed 14 years ago by sck-nogas (Scott C. Kennedy)

The patch file doesn't work for me either.

comment:15 Changed 14 years ago by sck-nogas (Scott C. Kennedy)

Cc: sck@… added

Cc Me!

comment:16 Changed 14 years ago by josh@…

Cc: josh@… added

Cc Me!

comment:17 in reply to:  11 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… added

Replying to manphiz@…:

try suppress build.args with empty, which is -j2 by default.

If you want to disable parallel building, the correct way to do so is to add "use_parallel_build no" to the Portfile, or append "build.jobs=1" to your command line (e.g. "sudo port install libvpx build.jobs=1").

comment:18 Changed 14 years ago by eregontp@…

Cc: eregontp@… added

Cc Me!

comment:19 in reply to:  7 Changed 14 years ago by eregontp@…

Replying to SlaunchaMan@…:

I'm having similar errors; my logfile looks just like jwhowse's.

I have the same issue.

Adding a colon to fmt_deps does not work for me either.

comment:20 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

Please selfupdate and try again. I've modified the portfile to fix one potential problem (if you've changed the default compiler using gcc_select) (r70196) and made it print more debugging info (r70195) so if it fails again, attach a new log so we can have a look.

Changed 14 years ago by eregontp@…

Attachment: main.2.log added

Build log after 'selfupdate'

comment:21 in reply to:  20 Changed 14 years ago by eregontp@…

Replying to ryandesign@…:

Please selfupdate and try again. I've modified the portfile to fix one potential problem (if you've changed the default compiler using gcc_select) (r70196) and made it print more debugging info (r70195) so if it fails again, attach a new log so we can have a look.

I just sent the main.log as you asked, say me if you need more information.

comment:22 Changed 14 years ago by bayonne

Cc: porter@… added

Cc Me!

Changed 14 years ago by manphiz@…

Attachment: main.3.log added

build log with verbose=1. Unfortunately no extra information as well.

comment:23 Changed 14 years ago by jiminaus@…

Cc: jiminaus@… added

Cc Me!

comment:24 Changed 14 years ago by boydb@…

Cc: boydb@… added

Cc Me!

comment:25 Changed 14 years ago by dershow

Cc: dersh@… added

Cc Me!

comment:26 in reply to:  20 ; Changed 14 years ago by joergahrens (Jörg Ahrens)

Replying to ryandesign@…:

Please selfupdate and try again. I've modified the portfile to fix one potential problem (if you've changed the default compiler using gcc_select) (r70196) and made it print more debugging info (r70195) so if it fails again, attach a new log so we can have a look.

No compiler problem, no portfile problem, just some automake crap added upstream: The build uses deps generated by gcc like this line

/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_multimedia_libvpx/work/libvpx-0.9.1/vp8/common/header.h

this is changed with sed

sed -e 's;^\(.*\)\.o;vp8/common/generic/\1.c.o vp8/common/generic/systemdependent.c.d;'  

and becomes

vp8/common/generic/  /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.c.o vp8/common/generic/systemdependent.c.drg_release_ports_multimedia_libvpx/work/libvpx-0.9.1/vp8/common/header.h

I think you see the problem.

The source of evil is in build/make/configure.sh in the line

fmt_deps = sed -e 's;^\(.*\)\.o;\$(dir \$@)\1\$(suffix \$<).o \$@;' #hide

Just change this to

fmt_deps = sed -e 's;^\(.*\)\.oxxxxx;\$(dir \$@)\1\$(suffix \$<).o \$@;' #hide

and the problem is gone.

comment:27 in reply to:  26 Changed 14 years ago by eregontp@…

Replying to joerg@…:

Replying to ryandesign@…:

Please selfupdate and try again. I've modified the portfile to fix one potential problem (if you've changed the default compiler using gcc_select) (r70196) and made it print more debugging info (r70195) so if it fails again, attach a new log so we can have a look.

No compiler problem, no portfile problem, just some automake crap added upstream: The build uses deps generated by gcc like this line

/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_multimedia_libvpx/work/libvpx-0.9.1/vp8/common/header.h

this is changed with sed

sed -e 's;^\(.*\)\.o;vp8/common/generic/\1.c.o vp8/common/generic/systemdependent.c.d;'  

and becomes

vp8/common/generic/  /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.c.o vp8/common/generic/systemdependent.c.drg_release_ports_multimedia_libvpx/work/libvpx-0.9.1/vp8/common/header.h

I think you see the problem.

The source of evil is in build/make/configure.sh in the line

fmt_deps = sed -e 's;^\(.*\)\.o;\$(dir \$@)\1\$(suffix \$<).o \$@;' #hide

Just change this to

fmt_deps = sed -e 's;^\(.*\)\.oxxxxx;\$(dir \$@)\1\$(suffix \$<).o \$@;' #hide

and the problem is gone.

This solved the problem for me too.

(I did: "port clean",fetch,extract, <modify the file>, build, destroot)

comment:28 Changed 14 years ago by sewebster@…

Excuse my lack of regexp/sed knowledge, but won't the proposed change to fmt_deps cause it to not match anything since nothing will have an .oxxxxx extension?

comment:29 Changed 14 years ago by sewebster@…

Cc: sewebster@… added

Cc Me!

Changed 14 years ago by royliu@…

Attachment: patch-configure.sh.diff added

The configure.sh patch with sed line terminators.

comment:30 Changed 14 years ago by royliu@…

To follow up on joerg's fix, I modified the configure.sh to include the $ as a sed line terminator. See attached file patch-configure.sh.diff.

comment:31 Changed 14 years ago by macports.20.cd@…

For those who may know how to edit a file in the terminal, but don't necessarily know all the arcana of how ports works, I'm going to add a bit more detail on how to do the workaround suggested by joerg@…

Joerg's workaround (hacking the sed line as seen above) worked for me. My error log was previously the same as the one shared by jwhowse4@….

And eregontp@… also mentioned the steps in detail; I'm just going to make a bit more clear. This is on OS X; on other systems ymmv. Here are the steps:

sudo port clean libvpx

sudo port fetch libvpx

sudo port extract libvpx

cd to the staging directory where the port was being built - this directory should have been shown in one of the error messages. On my system it was /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_multimedia_libvpx/work/libvpx-0.9.1/

then:

cd build/make

edit the configure.sh file in that folder to change the line as shown above.

sudo port build libvpx sudo port install libvpx

that worked for me.

When you're done with this, if you are still in that staging directory, you'll find it has been removed out from under you. cd back to your home directory if you wanted to do anything else in the terminal (say, build another port that depeneded on libvpx), otherwise you'll get an error message.

I don't know much about how ports work either. So I have empathy with my fellow macports newbies... thus the detail. Hopefully this is still helpful even after a patch has been added here.

Maybe one of the experts can tell me if (and why) I should have used sudo port destroot libvpx instead of sudo port install libvpx at the end?

comment:32 Changed 14 years ago by macports.20.cd@…

Ooops, in my post above two lines got changed into one. These should be separate steps:

sudo port build libvpx

sudo port install libvpx

Also when I say "change the line as shown above" I mean as shown in Joerg's message above. Or use the patch.

comment:33 Changed 14 years ago by sewebster@…

Royliu's patch works for me.

comment:34 in reply to:  26 Changed 14 years ago by raimue (Rainer Müller)

Resolution: fixed
Status: assignedclosed

Wow, so much thanks for your findings! I am stunned.

Now I also understand why it did work for Joshua, Ryan and me. We are most probably using a custom source URL which does not contain macports.org which prevents the problem.

Committed in r70208.

comment:35 in reply to:  28 Changed 14 years ago by joergahrens (Jörg Ahrens)

Replying to sewebster@…:

Excuse my lack of regexp/sed knowledge, but won't the proposed change to fmt_deps cause it to not match anything since nothing will have an .oxxxxx extension?

Absolutely true and so it can't do any harmful changes ;-) Having dep files while developing an application is a nice feature but in our case everything had to be built anyway. Although it may be possible to have a complex build which uses dep files to influence the build order and so royliu's fix is much cleaner.

comment:36 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

Joerg, thank you for analyzing and finding the solution for this amazing problem. Can you also send your conclusions and patch to the developers of this software so they can fix it upstream for the next version?

comment:37 in reply to:  36 Changed 14 years ago by joergahrens (Jörg Ahrens)

Replying to ryandesign@…:

Joerg, thank you for analyzing and finding the solution for this amazing problem. Can you also send your conclusions and patch to the developers of this software so they can fix it upstream for the next version?

This problem is already fixed upstream in trunk.

Note: See TracTickets for help on using tickets.