installworld broken from R/O /usr/obj
W`hile installworld is being discussed, I wanted to get this out there: Since rev 1.13 of usr.bin/make/arch.c, I've been seing a problem with ELF archive libraries being rebuilt unnecessarily. I believe that this problem can be traced to the RANLIBMAG string being set to "/". The reason I care about this is that its causing perl's libsdbm.a to get rebuilt during an installworld. This is causing installworlds to fail for me from R/O /usr/obj partitions. When make does its initial open of the library, Arch_LibOODate() calls ArchStatMember with the member arg equal to RANLIBMAG (or "/"). This in turn calls ArchStatMember() with member="/". This calls ArchFindMember() with member="/". ArchFindMember() will then return NULL because the strrchr() on line 809 of arch.c causes the pointer to be advanced past the last "/" in the member path, which makes it NULL. I have a hackish fix for this which just looks at the length of RANLIBMAG & the length of member. If they are both 1 && are equal, it fails to advance member past the trailing /. This allows the RANLIBMAG string to be found & prevents an up-to-date lib from being rebuilt: Index: usr.bin/make/arch.c === RCS file: /usr/project/ari_scratch2/freebsd-cvs/src/usr.bin/make/arch.c,v retrieving revision 1.14 diff -u -b -B -r1.14 arch.c --- arch.c 1999/09/11 13:08:00 1.14 +++ arch.c 1999/09/21 13:25:39 @@ -807,7 +807,9 @@ * the comparisons easier... */ cp = strrchr (member, '/'); -if (cp != (char *) NULL) { +if ((cp != (char *) NULL) && + !((strlen(member) == 1) && (strlen(RANLIBMAG) == 1) && + strncmp(member, RANLIBMAG, 1) == 0)){ member = cp + 1; } len = tlen = strlen (member); Anybody interested in comitting this? I passed it by the person who committed 1.13 of arch.c & was ignored. I don't know make well enough to feel comfortable committing this myself. Drew -- Andrew Gallatin, Sr Systems Programmer http://www.cs.duke.edu/~gallatin Duke University Email: [EMAIL PROTECTED] Department of Computer Science Phone: (919) 660-6590 To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: installworld broken from R/O /usr/obj
> W`hile installworld is being discussed, I wanted to get this out there: > > Since rev 1.13 of usr.bin/make/arch.c, I've been seing a problem with > ELF archive libraries being rebuilt unnecessarily. I believe that > this problem can be traced to the RANLIBMAG string being set to "/". There's a PR about this now. The smaller fix in the PR seems to work. Rev.1.13 of arch.c also weakened aout support. RANLIBMAG is configured at compile time, so only one of elf and aout is supported by a given `make' binary. It's not clear that this is good enough for `make upgrade' where the same tools are expected to support both aout and elf. > The reason I care about this is that its causing perl's libsdbm.a to > get rebuilt during an installworld. This is causing installworlds to > fail for me from R/O /usr/obj partitions. There must be a bug in the perl makefiles for `install' to depend on anything. The bug in libgcc_r/Makefile that caused libraries to be rebuilt didn't affect your installworld, since the libgcc_r Makefile has correct dependencies for `install'. Bruce To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: installworld broken from R/O /usr/obj
Bruce Evans writes: > > W`hile installworld is being discussed, I wanted to get this out there: > > > > Since rev 1.13 of usr.bin/make/arch.c, I've been seing a problem with > > ELF archive libraries being rebuilt unnecessarily. I believe that > > this problem can be traced to the RANLIBMAG string being set to "/". > > There's a PR about this now. The smaller fix in the PR seems to work. Ah yes, in bin/14167. The fix is much tighter & appears to work. -- Andrew Gallatin, Sr Systems Programmer http://www.cs.duke.edu/~gallatin Duke University Email: [EMAIL PROTECTED] Department of Computer Science Phone: (919) 660-6590 To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: installworld broken from R/O /usr/obj
Julian Elischer writes: > that fix was applied by me about 5 minutes ago.. > Thank you! Drew To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: installworld broken from R/O /usr/obj
that fix was applied by me about 5 minutes ago.. On Sun, 10 Oct 1999, Andrew Gallatin wrote: > > Bruce Evans writes: > > > W`hile installworld is being discussed, I wanted to get this out there: > > > > > > Since rev 1.13 of usr.bin/make/arch.c, I've been seing a problem with > > > ELF archive libraries being rebuilt unnecessarily. I believe that > > > this problem can be traced to the RANLIBMAG string being set to "/". > > > > There's a PR about this now. The smaller fix in the PR seems to work. > > Ah yes, in bin/14167. The fix is much tighter & appears to work. > > -- > Andrew Gallatin, Sr Systems Programmerhttp://www.cs.duke.edu/~gallatin > Duke University Email: [EMAIL PROTECTED] > Department of Computer SciencePhone: (919) 660-6590 > > > > > > > To Unsubscribe: send mail to [EMAIL PROTECTED] > with "unsubscribe freebsd-current" in the body of the message > To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message