Page 1 of 1

[SOLVED] nVIDIA 346.35 and nvidia-mgabuild.sh

PostPosted: Jan 19th, '15, 22:54
by bertaerts
nVIDIA has a new long lived branch driver 346.35: http://www.nvidia.com/object/unix.html
http://onse.fi/nvidia-mgabuild/ can be used to create rpm's from this .run downloadable file.
This website is not up to date and refers to:
http://svnweb.mageia.org/packages/cauldron/nvidia-current/current/?pathrev=811426
Which contains a 2 year old nvidia-mgabuild-skel
and nvidia-current.spec already updated for this new long lived driver by tmb.
Code: Select all
cat nvidia-mgabuild-skel nvidia-current.spec > nvidia-mgabuild.sh

Code: Select all
bash nvidia-mgabuild.sh NVIDIA-Linux-x86_64-346.35.run

gives a lot of not normal text output and finally
Code: Select all
error: Bad exit status from /tmp/nvidia-mgabuild.2r7dCi/tmp/rpm-tmp.tANr3C (%install)


With the previous driver NVIDIA-Linux-x86_64-340.65.run the script still runs fine and creates working rpm's.

What could be wrong?

P.S. I plan to use this new driver on Mageia 4 x86_64.

Re: nVIDIA 346.35 and nvidia-mgabuild.sh

PostPosted: Jan 20th, '15, 21:11
by doktor5000
bertaerts wrote:
Code: Select all
bash nvidia-mgabuild.sh NVIDIA-Linux-x86_64-346.35.run

gives a lot of not normal text output and finally
Code: Select all
error: Bad exit status from /tmp/nvidia-mgabuild.2r7dCi/tmp/rpm-tmp.tANr3C (%install)


With the previous driver NVIDIA-Linux-x86_64-340.65.run the script still runs fine and creates working rpm's.

What could be wrong?

The error message you posted is only the result that rpmbuild returns. The real error is a bit above that:
┌─[doktor5000@Mageia5]─[20:02:56]─[~]
└──╼ bash nvidia-mgabuild.sh NVIDIA-Linux-x86_64-346.35.run

Building a package of NVIDIA driver 346.35 for x86_64, this will take a few minutes... rpmbuild output follows:

[snip]

+ section=nothingyet
+ set +x
++ wc -l pcitable.nvidia.lst
++ cut -f1 '-d '
+ '[' 1 -gt 200 ']'
error: Bad exit status from /tmp/nvidia-mgabuild.0l0aJ6/tmp/rpm-tmp.cw4CU3 (%install)


RPM build errors:
Bad exit status from /tmp/nvidia-mgabuild.0l0aJ6/tmp/rpm-tmp.cw4CU3 (%install)

Building package failed!



What happens during the package build is the README contained in the driver is parsed,
and the script tries to write a list of supported cards, and then runs a few checks on that list.
Something in the README format has changed, and hence the parsing fails, and the list is not generated,
then the script errors out, relevant test that you see in the rpmbuild verbose output above:

┌─[doktor5000@Mageia5]─[20:05:08]─[~]
└──╼ grep -n pcitable.nvidia.lst nvidia-mgabuild.sh
970:done | sort -u > pcitable.nvidia.lst
972:[ $(wc -l pcitable.nvidia.lst | cut -f1 -d" ") -gt 200 ]
975:gzip -c pcitable.nvidia.lst > %{buildroot}%{_datadir}/ldetect-lst/pcitable.d/40%{drivername}.lst.gz


Either you comment out line 972 via an editor or via
Code: Select all
sed -i 's|\[ \$(wc -l pcitable.nvidia.lst|#\[ \$(wc -l pcitable.nvidia.lst|g' nvidia-mgabuild.sh
or you rewrite the parsing from line 945 to 970 :P

Re: nVIDIA 346.35 and nvidia-mgabuild.sh

PostPosted: Jan 20th, '15, 21:37
by bertaerts
Hi doktor5000,
Thank you very much for your detailed analysis.
My laptop is now running with the new driver 346.35.
Thanks again!!

Will you communicate your findings to tmb?

Re: nVIDIA 346.35 and nvidia-mgabuild.sh

PostPosted: Jan 20th, '15, 22:35
by doktor5000
bertaerts wrote:Will you communicate your findings to tmb?

Already sent it two times to Anssi, who's the maintainer of that script but it seems he's quite busy.

Updated against latest svn and forwarded to -dev ml: https://ml.mageia.org/wwsympa-wrapper.f ... 00559.html