#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)
Change History (45)
Changed 14 years ago by manphiz@…
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: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 follow-up: 5 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 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 follow-up: 11 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_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 follow-up: 19 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: | new → assigned |
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 follow-up: 10 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 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 follow-up: 17 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: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:17 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:19 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 follow-ups: 21 26 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)
comment:21 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.
Changed 14 years ago by manphiz@…
Attachment: | main.3.log added |
---|
build log with verbose=1. Unfortunately no extra information as well.
comment:26 follow-ups: 27 34 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 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.hthis 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.hI 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 \$@;' #hideJust change this to
fmt_deps = sed -e 's;^\(.*\)\.oxxxxx;\$(dir \$@)\1\$(suffix \$<).o \$@;' #hideand the problem is gone.
This solved the problem for me too.
(I did: "port clean",fetch,extract, <modify the file>, build, destroot)
comment:28 follow-up: 35 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?
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:34 Changed 14 years ago by raimue (Rainer Müller)
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
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 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 follow-up: 37 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 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.
building log