pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: PLIST problem on Solaris 10

On Thu, May 27, 2021 at 12:43:58PM +0200, Claes Nästén wrote:
Have a look at what your /dev/null currently is, should be something

$ ls -l /dev/null
crw-rw-rw-   1 root     root      13,  2 May 27 09:45 /dev/null


$ ls -l /dev/null
lrwxrwxrwx   1 root     other         27 Apr 12 20:01 /dev/null ->

If it's a regular file, recreate /dev/null, remove your work directories
and try again.

Thank you Claes, that was it!

# ls -l /dev/null
-rw-r--r-- 1 root root 0 May 27 08:11 /dev/null

# rm /dev/null && ln -s ../devices/pseudo/mm@0:null /dev/null
# ls -l /dev/null
lrwxrwxrwx 1 root root 27 May 27 12:15 null -> ../devices/pseudo/mm@0:null

And install is working.

I've also rebuilt the last few installed packages before /dev/null broke, and found the one causing the issue: devel/git-base

Ultimately I had to resort to truss to find out wtf is going on here:
22964:  execve("/opt/csw/libexec/gcc/sparc-sun-solaris2.10/5.5.0/cc1", 0x00103EE8, 0x001035FC)  argc = 30
22964:   argv: /opt/csw/libexec/gcc/sparc-sun-solaris2.10/5.5.0/cc1
22964:    -quiet -I /usr/pkg/include -I /usr/include -I
22964:    /usr/pkg/include -I /usr/include -MMD /dev/null.d -MF
22964:    /dev/null -MP -MQ /dev/null -D__sparcv8 -D _FORTIFY_SOURCE=2
22964:    /dev/null -quiet -dumpbase null -mcpu=v9 -auxbase-strip
22964:    /dev/null -O2 -o /var/tmp//ccWh7Ysa.s
22966:  execve("/usr/ccs/bin/as", 0x00103EE8, 0x001035FC)  argc = 8
22966:   argv: /usr/ccs/bin/as -Qy -s -xarch=v8plus -m32 -o /dev/null
22966:    /var/tmp//ccWh7Ysa.s
22966:  unlink("/dev/null")                             = 0
22966:  open("/dev/null", O_RDWR|O_SYNC|O_CREAT, 0666)  = 3

That is, the Solaris assembler deletes its output file first, then recreates it. For reference, the one on this machine is:
# as -V
as: SunOS 5.10 118683-07 Patch 05/02/2011

Now in the git Makefile there are 3 places calling the compiler with "-o /dev/null", all of which will cause /dev/null to be overwritten. This is one of these commands which can be used for reproduction (it's for setting the variable dep_check):
gcc -O2 -D_FORTIFY_SOURCE=2 -I/usr/pkg/include -I/usr/include -c -MF /dev/null -MQ /dev/null -MMD -MP -x c /dev/null -o /dev/null


Attachment: signature.asc
Description: PGP signature

Home | Main Index | Thread Index | Old Index