Re: Bug in make setting wrong MAKESYSPATH
Thomas Muellerwrote: > Just because I found a workaround does not mean it is not a bug. Sorry I don't know what else to tell you. make is behaving as it should, based on the way it is configured. That setup was deemed the most useful by those working on src/, so is not likely to be changed. I guess we should add a note to the man page... ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Bug in make setting wrong MAKESYSPATH
>From Simon J. Gerraty: >> Bug occurs when building or configuring ports, syntax error in >> /BETA1/usr/share/mk/bsd.compiler.mk line 52 >This is of course specific to your particular arrangement >if you'd mounted /BETA1/usr/ports on /usr/ports, it would function as >you wish, or if /BETA1/usr/share/mk happend to match /usr/share/mk >it would work fine. >So, anoying in this case, but not a bug. >> I don't know about other situations such as building doc. >> I could avoid this error either by setting (setenv or export, depending on >> shell) MAKESYSPATH or >> by null-mounting /BETA1/usr/ports at /usr/ports . >Yes. Just because I found a workaround does not mean it is not a bug. If I were setting up a computer or hard disk from the beginning, I would put ports tree, src tree(s) and doc trees on a separate partition with no FreeBSD installation. NetBSD pkgsrc and src trees could be installed on same or another partition. That would facilitate backing up the entire installation (FreeBSD or NetBSD) without backing up the src and other trees, which could be redownloaded by cvs, svn or git, as the case might be. I guess then I would need to set MAKESYSPATH in FreeBSD ports, or null-mount PORTSDIR at /usr/ports. If you look at github.com/FreeBSD, you see some modified ports trees that might be installed at, for instance /freebsd-ports-graphics Tom ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Bug in make setting wrong MAKESYSPATH
Thomas Muellerwrote: > When I did those last examples, that last line was > env MAKESYSPATH=/usr/share/mk make all-depends-list ok, that makes sense. > > > and then it seems to work correctly with no syntax error in > > > /BETA1/usr/share/mk/bsd.compiler.mk > > > > > Maybe I need to file a bug. > > > For what? > > Bug occurs when building or configuring ports, syntax error in > /BETA1/usr/share/mk/bsd.compiler.mk line 52 This is of course specific to your particular arrangement if you'd mounted /BETA1/usr/ports on /usr/ports, it would function as you wish, or if /BETA1/usr/share/mk happend to match /usr/share/mk it would work fine. So, anoying in this case, but not a bug. > I don't know about other situations such as building doc. > > I could avoid this error either by setting (setenv or export, depending on > shell) MAKESYSPATH or > by null-mounting /BETA1/usr/ports at /usr/ports . Yes. ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Bug in make setting wrong MAKESYSPATH
>From Simon J. Gerraty: > Thomas Muellerwrote: > > I go into /BETA1/usr/ports/ports-mgmt/synth , run > > env MAKESYSPATH make all-depends-list > I assume you mean MAKESYSPATH=something? otherwise env itself should > vomit When I did those last examples, that last line was env MAKESYSPATH=/usr/share/mk make all-depends-list > > and then it seems to work correctly with no syntax error in > > /BETA1/usr/share/mk/bsd.compiler.mk > > > Maybe I need to file a bug. > For what? Bug occurs when building or configuring ports, syntax error in /BETA1/usr/share/mk/bsd.compiler.mk line 52 I don't know about other situations such as building doc. I could avoid this error either by setting (setenv or export, depending on shell) MAKESYSPATH or by null-mounting /BETA1/usr/ports at /usr/ports . > > What happens if src, ports and doc trees are installed on an NFS > > share, where there would be no FreeBSD installation? > Not sure what you mean. make doesn't care what the filesystem is > if there is a share/mk found in . or somewhere above it, the default > MAKESYSPATH will find it. Tom ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Bug in make setting wrong MAKESYSPATH
Thomas Muellerwrote: > I go into /BETA1/usr/ports/ports-mgmt/synth , run > env MAKESYSPATH make all-depends-list I assume you mean MAKESYSPATH=something? otherwise env itself should vomit > and then it seems to work correctly with no syntax error in > /BETA1/usr/share/mk/bsd.compiler.mk > > Maybe I need to file a bug. For what? > What happens if src, ports and doc trees are installed on an NFS > share, where there would be no FreeBSD installation? Not sure what you mean. make doesn't care what the filesystem is if there is a share/mk found in . or somewhere above it, the default MAKESYSPATH will find it. ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Bug in make setting wrong MAKESYSPATH
>From Simon J. Gerraty: > > Thomas Muellerwrote: > > For building the system, MAKESYSPATH should be $SRCDIR/share/mk , to be in > > sync. > > I tried "make -V MAKESYSPATH" from several SRCDIRs, and that's what > > happened. > Yes. If you look at share/mk/src.sys.env.mk > it detects that it was found via a .../ path, and replaces it in > MAKESYSPATH with the actual location - otherwise some makefiles break. > > So maybe I have to set MAKESYSPATH every time I am in ports, don't > > know if this would work from /etc/make.conf (need to experiment). > Probably not, because sys.mk will have already been found before that > ie. the damage may already have been done > > I wonder what would happen if there is no FreeBSD installation at all > > on partition where ports tree is located. > An error like: > make: no system rules (sys.mk). I go into /BETA1/usr/ports/ports-mgmt/synth , run env MAKESYSPATH make all-depends-list and then it seems to work correctly with no syntax error in /BETA1/usr/share/mk/bsd.compiler.mk Maybe I need to file a bug. What happens if src, ports and doc trees are installed on an NFS share, where there would be no FreeBSD installation? Tom ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Bug in make setting wrong MAKESYSPATH
Thomas Muellerwrote: > For building the system, MAKESYSPATH should be $SRCDIR/share/mk , to be in > sync. > > I tried "make -V MAKESYSPATH" from several SRCDIRs, and that's what happened. Yes. If you look at share/mk/src.sys.env.mk it detects that it was found via a .../ path, and replaces it in MAKESYSPATH with the actual location - otherwise some makefiles break. > So maybe I have to set MAKESYSPATH every time I am in ports, don't > know if this would work from /etc/make.conf (need to experiment). Probably not, because sys.mk will have already been found before that ie. the damage may already have been done > I wonder what would happen if there is no FreeBSD installation at all > on partition where ports tree is located. An error like: make: no system rules (sys.mk). > > > Yes, but requires you to keep /usr/share/mk in sync with whatever you a > > building, tricky if you build head, stable/10 and stable/11 on the > > same box. > > I don't think you have to do that, since I find that MAKESYSPATH > becomes $SRCDIR/share/mk . Per above; that's due to the default .../share/mk I was speaking about alternatives to that magic value. Thanks --sjg ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Bug in make setting wrong MAKESYSPATH
>From Simon J. Gerraty: > Thomas Muellerwrote: > > It seems to me that MAKESYSPATH should match the host building system > > FreeBSD version. > Which would only be correct if building the same version of FreeBSD as > is running on the host. > Many folk work on multiple branches on the same machine. I have even built FreeBSD i386 from FreeBSD amd64, and vice versa. Even when the user tracks only one branch, such as HEAD, one or more /usr/share/mk files may have been updated since the last build, and therefore not in sync with the build host's /usr/share/mk . For building the system, MAKESYSPATH should be $SRCDIR/share/mk , to be in sync. I tried "make -V MAKESYSPATH" from several SRCDIRs, and that's what happened. Like this: $ make -C /usr/src -V MAKESYSPATH /usr/src/share/mk $ make -C /freebsd-base-graphics -V MAKESYSPATH /freebsd-base-graphics/share/mk > Thus for anyone working on src/ there is no guarantee that /usr/share/mk > is even remotely correct. > So you either buy into the idea of using a wrapper script and canned > .env file for each tree (that's what I do; > http://www.crufty.net/sjg/docs/sb-tools.htm) to ensure correct > settings per tree (whether FreeBSD, NetBSD, ...), or you compromise and > have 'make' itself try to find the "correct" share/mk for whereever it is. > This is why the default MAKESYSPATH starts with .../share/mk > > Now I believe the correct syntax for setting MAKESYSPATH in .cshrc and > > .profile would be > > export MAKESYSPATH=/usr/share/mk # for .profile, or > > setenv MAKESYSPATH /usr/share/mk # for .cshrc Something like that might be appropriate for ports but not for building the system. So maybe I have to set MAKESYSPATH every time I am in ports, don't know if this would work from /etc/make.conf (need to experiment). I wonder what would happen if there is no FreeBSD installation at all on partition where ports tree is located. > Yes, but requires you to keep /usr/share/mk in sync with whatever you a > building, tricky if you build head, stable/10 and stable/11 on the > same box. I don't think you have to do that, since I find that MAKESYSPATH becomes $SRCDIR/share/mk . > sjg Tom ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Bug in make setting wrong MAKESYSPATH
Thomas Muellerwrote: > It seems to me that MAKESYSPATH should match the host building system > FreeBSD version. Which would only be correct if building the same version of FreeBSD as is running on the host. Many folk work on multiple branches on the same machine. Thus for anyone working on src/ there is no guarantee that /usr/share/mk is even remotely correct. So you either buy into the idea of using a wrapper script and canned .env file for each tree (that's what I do; http://www.crufty.net/sjg/docs/sb-tools.htm) to ensure correct settings per tree (whether FreeBSD, NetBSD, ...), or you compromise and have 'make' itself try to find the "correct" share/mk for whereever it is. This is why the default MAKESYSPATH starts with .../share/mk > Now I believe the correct syntax for setting MAKESYSPATH in .cshrc and > .profile would be > export MAKESYSPATH=/usr/share/mk # for .profile, or > setenv MAKESYSPATH /usr/share/mk # for .cshrc Yes, but requires you to keep /usr/share/mk in sync with whatever you a building, tricky if you build head, stable/10 and stable/11 on the same box. --sjg ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Bug in make setting wrong MAKESYSPATH
> On Sun, May 21, 2017 at 1:54 AM, Thomas Muellerwrote: > > I tried building ports, starting with ports-mgmt/synth, on HEAD > > (12-current) and ran into difficulties with syntax error in bsd.compiler.mk > > . > > With PORTSDIR on another partition, mounted as /BETA1, I got these errors, > > but not when I null-mounted /BETA1/usr/ports as /usr/ports. > > I shouldn't have to resort to this kludge, didn't have to in the recent > > past. > > This bug shows in both 11.0-STABLE and 12.0-CURRENT. > > I looked into "man make" and found that make got the wrong path for > > MAKESYSPATH, setting to /BETA1/usr/share/mk instead of what it should be, > > /usr/share/mk . > > Going into /BETA1/usr/ports/archivers/zip (for a short and simple example), > > make all-depends-list produced > > sh: Syntax error: ")" unexpected > > make: "/BETA1/usr/share/mk/bsd.compiler.mk" line 52: warning: "echo 4.0.0 > > 4.0.0) | awk -F. '{print $1 * 1 + $2 * 100 + $3;}'" returned non-zero > > status > > sh: Syntax error: ")" unexpected > > make[1]: "/BETA1/usr/share/mk/bsd.compiler.mk" line 52: warning: "echo > > 4.0.0 4.0.0) | awk -F. '{print $1 * 1 + $2 * 100 + $3;}'" returned > > non-zero status > > /BETA1/usr/ports/ports-mgmt/pkg > > make -m /usr/share/mk all-depends-list produces > > /BETA1/usr/ports/ports-mgmt/pkg > > This looks like a bug that ought to be fixed, though there is a workaround > > using "make -m /usr/share/mk ..." every time, or presumably, setting > > MAKESYSPATH=/usr/share/mk > > in the environment. > > Should I file a bug report? > > I could get much more verbose outputs when there are more dependencies, > > such as in /BETA1/usr/ports/ports-mgmt/synth, or more so, > > /BETA1/usr/ports/www/seamonkey > > I also noticed that in newer versions of FreeBSD, > > /usr/share/mk/bsd.compiler.mk has greatly increased in size (not a bug. > > except when "make" goes to the wrong MAKESYSPATH. > > Maybe add in .cshrc and .profile > > MAKESYSPATH=/usr/share/mk > ? > Hi Tom, > make isn't at fault here as much as there's something else leaking > bsd.compiler.mk into the ports build. That's not supposed to happen. > Are you including any bsd.*.mk or src.*.mk files from /etc/make.conf , > /etc/src.conf , etc? > Cheers, > -Ngie I looked through /etc/make.conf and /etc/src.conf, and there were no explicit references to any .mk files. So I don't know what could have brought in /BETA1/usr/share/mk/bsd.compiler.mk . from Simon J. Gerraty: > The default value for MAKESYSPATH is ".../share/mk:/usr/share/mk" which > is geared to building src/, there was some to and fro over that value > when we first started using bmake, but that's what we settled on. > Presumably /BETA1/usr/share/mk exists? > If so, it will be found via .../share/mk if you start somewhere under > /BETA1/usr/ports > > This bug shows in both 11.0-STABLE and 12.0-CURRENT. > Not a bug - working as intended, which doesn't mean it is doing what you > want. > You can of course set MAKESYSPATH as you wish, but of course > /usr/share/mk would not be correct for building src/ /BETA1 is a mount point for a partition with an older FreeBSD 11-current (August 2015) installation. Ports, doc, src11 (src tree for 11-STABLE), and src (src tree for HEAD) have been updated since then. What if I had a NetBSD installation, or no BSD installation, on the partition where src and ports trees are located? It seems to me that MAKESYSPATH should match the host building system FreeBSD version. I also have /pkgsrc and /netbsd-HEAD/usr/src on that same partition mounted at /BETA1, and it didn't seem to have any adverse effect on building NetBSD system or packages. For FreeBSD, besides setting MAKESYSPATH, I could mount_nullfs /BETA1/usr/ports at /usr/ports, and /BETA1/usr/src or /BETA1/usr/src11 at /usr/src . Now I believe the correct syntax for setting MAKESYSPATH in .cshrc and .profile would be export MAKESYSPATH=/usr/share/mk # for .profile, or setenv MAKESYSPATH /usr/share/mk # for .cshrc Tom ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Bug in make setting wrong MAKESYSPATH
On Sun, May 21, 2017 at 1:54 AM, Thomas Muellerwrote: > I tried building ports, starting with ports-mgmt/synth, on HEAD (12-current) > and ran into difficulties with syntax error in bsd.compiler.mk . > > With PORTSDIR on another partition, mounted as /BETA1, I got these errors, > but not when I null-mounted /BETA1/usr/ports as /usr/ports. > > I shouldn't have to resort to this kludge, didn't have to in the recent past. > > This bug shows in both 11.0-STABLE and 12.0-CURRENT. > > I looked into "man make" and found that make got the wrong path for > MAKESYSPATH, setting to /BETA1/usr/share/mk instead of what it should be, > /usr/share/mk . > > Going into /BETA1/usr/ports/archivers/zip (for a short and simple example), > make all-depends-list produced > > sh: Syntax error: ")" unexpected > make: "/BETA1/usr/share/mk/bsd.compiler.mk" line 52: warning: "echo 4.0.0 > 4.0.0) | awk -F. '{print $1 * 1 + $2 * 100 + $3;}'" returned non-zero > status > sh: Syntax error: ")" unexpected > make[1]: "/BETA1/usr/share/mk/bsd.compiler.mk" line 52: warning: "echo 4.0.0 > 4.0.0) | awk -F. '{print $1 * 1 + $2 * 100 + $3;}'" returned non-zero > status > /BETA1/usr/ports/ports-mgmt/pkg > > make -m /usr/share/mk all-depends-list produces > /BETA1/usr/ports/ports-mgmt/pkg > > This looks like a bug that ought to be fixed, though there is a workaround > using "make -m /usr/share/mk ..." every time, or presumably, setting > MAKESYSPATH=/usr/share/mk > in the environment. > > Should I file a bug report? > > I could get much more verbose outputs when there are more dependencies, such > as in /BETA1/usr/ports/ports-mgmt/synth, or more so, > /BETA1/usr/ports/www/seamonkey > > I also noticed that in newer versions of FreeBSD, > /usr/share/mk/bsd.compiler.mk has greatly increased in size (not a bug. > except when "make" goes to the wrong MAKESYSPATH. > > Maybe add in .cshrc and .profile > MAKESYSPATH=/usr/share/mk > ? Hi Tom, make isn't at fault here as much as there's something else leaking bsd.compiler.mk into the ports build. That's not supposed to happen. Are you including any bsd.*.mk or src.*.mk files from /etc/make.conf , /etc/src.conf , etc? Cheers, -Ngie ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Bug in make setting wrong MAKESYSPATH
Thomas Muellerwrote: > I tried building ports, starting with ports-mgmt/synth, on HEAD > (12-current) and ran into difficulties with syntax error in > bsd.compiler.mk . > > With PORTSDIR on another partition, mounted as /BETA1, I got these > errors, but not when I null-mounted /BETA1/usr/ports as /usr/ports. > > I shouldn't have to resort to this kludge, didn't have to in the > recent past. The default value for MAKESYSPATH is ".../share/mk:/usr/share/mk" which is geared to building src/, there was some to and fro over that value when we first started using bmake, but that's what we settled on. Presumably /BETA1/usr/share/mk exists? If so, it will be found via .../share/mk if you start somewhere under /BETA1/usr/ports > This bug shows in both 11.0-STABLE and 12.0-CURRENT. Not a bug - working as intended, which doesn't mean it is doing what you want. You can of course set MAKESYSPATH as you wish, but of course /usr/share/mk would not be correct for building src/ ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"