DevHeads.net

compilation of mlt-freeworld-6.12.0 fails

Hi,

want to compile new mlt-freeworld-6.12.0 [1], but it fails in the %install section

...
%install
%make_install
#before remove it print it to check with main mlt package
find %{buildroot} | grep -vP "mlt/avformat|libmltavformat.so"
# remove all execept avformat (ffmpeg part)
find %{buildroot} -type f | grep -vP "mlt/avformat|libmltavformat.so" | xargs rm
find %{buildroot} -type l -delete
find %{buildroot} -type d -empty -delete
..

The error message is:

+ find /home/martin/rpmbuild/BUILDROOT/mlt-freeworld-6.12.0-1.fc29.x86_64 -type f
+ xargs rm
+ grep -vP 'mlt/avformat|libmltavformat.so'
rm: cannot remove '/home/martin/rpmbuild/BUILDROOT/mlt-freeworld-6.12.0-1.fc29.x86_64/usr/share/mlt/presets/consumer/avformat/lossless/Ut': No such file or directory
rm: cannot remove 'Video': No such file or directory
rm: cannot remove '/home/martin/rpmbuild/BUILDROOT/mlt-freeworld-6.12.0-1.fc29.x86_64/usr/share/mlt/presets/consumer/avformat/alpha/Quicktime': No such file or directory
rm: cannot remove 'Animation': No such file or directory
rm: cannot remove '/home/martin/rpmbuild/BUILDROOT/mlt-freeworld-6.12.0-1.fc29.x86_64/usr/share/mlt/presets/consumer/avformat/alpha/Ut': No such file or directory
rm: cannot remove 'Video': No such file or directory
error: Bad exit status from /var/tmp/rpm-tmp.KGk9Ye (%install)

[1] <a href="https://martinkg.fedorapeople.org/Packages/test/mlt-freeworld.spec" title="https://martinkg.fedorapeople.org/Packages/test/mlt-freeworld.spec">https://martinkg.fedorapeople.org/Packages/test/mlt-freeworld.spec</a>

Thanks
Martin

Comments

Re: compilation of mlt-freeworld-6.12.0 fails

By J. Randall Owens at 11/29/2018 - 10:21

There are spaces in the file names, so it sees something like "Ut Video"
and xargs parses it as meaning "Ut" and "Video". Easiest way to fix it
is probably to change the paths to be null-terminated, by adding -print0
to the find and -0 to the xargs, like so:

find %{buildroot} -type f -print0 | grep -vP
"mlt/avformat|libmltavformat.so" | xargs -0 rm

Hope that helps; xargs isn't something I know especially well, just
enough to be dangerous.

On 29/11/2018 14:12, Martin Gansser wrote:

Re: compilation of mlt-freeworld-6.12.0 fails

By Martin Gansser at 11/29/2018 - 10:29

thanks for your answer, but there a new error message:

/home/martin/rpmbuild/BUILDROOT/mlt-freeworld-6.12.0-1.fc29.x86_64/usr/bin/melt
+ grep -vP 'mlt/avformat|libmltavformat.so'
+ find /home/martin/rpmbuild/BUILDROOT/mlt-freeworld-6.12.0-1.fc29.x86_64 -type f -print0
+ xargs -0 rm
rm: cannot remove 'Binary file (standard input) matches'$'\n': No such file or directory
error: Bad exit status from /var/tmp/rpm-tmp.xUeMnu (%install)

RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.xUeMnu (%install)

Re: compilation of mlt-freeworld-6.12.0 fails

By J. Randall Owens at 11/29/2018 - 10:28

Oh, and I think the grep will also have to be tweaked with a -z to take
the null termination into account:

find %{buildroot} -type f -print0 | grep -vPz
"mlt/avformat|libmltavformat.so" | xargs -0 rm

On 29/11/2018 14:21, J. Randall Owens wrote:

Re: compilation of mlt-freeworld-6.12.0 fails

By Martin Gansser at 11/29/2018 - 10:36

Many thanks, now it works.

Martin