Re: "/sys/conf/kmod.mk", line 111: Malformed conditional (${MK_CLANG_IS_CC}

2012-04-17 Thread Dimitry Andric

On 2012-04-17 17:59, Arno J. Klaassen wrote:
...

I verified and re-verfied : kernel and world perfectly in sync; /usr/src
is a symlink but /sys points to the right place and (before patch)
/usr/share/mk/bsd.own.mk and /usr/src/share/mk/bsd.own.mk are
indentical.

Still I have to apply something like the following patch to get
VirtualBox kernel module compiled (no idea who/where MK_CLANG_IS_CC
gets set to "no", AFAIK not by me (I don't use src.conf and nothing
about CLANG in make.conf).


I was going to say that all the MK_XXX defines get set in bsd.own.mk,
but apparently there is an exception specifically for ports!  It has the
following fragment:

  [...]
  .if !defined(_WITHOUT_SRCCONF)
  #
  # Define MK_* variables (which are either "yes" or "no") for users
  # to set via WITH_*/WITHOUT_* in /etc/src.conf and override in the
  # make(1) environment.

while bsd.port.mk has:

  [...]
  # Needed to keep bsd.own.mk from reading in /etc/src.conf
  # and setting MK_* variables when building ports.
  _WITHOUT_SRCCONF=
  [...]
  .include 
  .include "${BSDPORTMK}"

So those variables intentionally don't get set.  This is bit of a pity,
since particularly the information that '/usr/bin/cc' can be gcc or
clang (indicated by MK_CLANG_IS_CC) is rather relevant for ports.

Of course, that setting is normally configured in src.conf(5), which
emphatically does *not* apply to ports, but since it influences what
/usr/bin/cc will be, it is still of interest.  E.g. you can't detect
anymore whether someone is using clang by checking ${CC}...

I'm not sure what the best solution is in this case, I would really like
some feedback from ports people. :)
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: "/sys/conf/kmod.mk", line 111: Malformed conditional (${MK_CLANG_IS_CC}

2012-04-17 Thread Kevin Oberman
On Tue, Apr 17, 2012 at 2:49 AM, Dimitry Andric  wrote:
> On 2012-04-17 11:36, Anton Shterenlikht wrote:
>>
>> On Tue, Apr 17, 2012 at 11:18:29AM +0200, Dimitry Andric wrote:
>
> ...
>
>>> That said, i think it may be time to bow to the pressure, and just put a
>>> fixup for this issue in kmod.mk, and the other .mk files, like I
>>> initially did in r232473, but with a BIG FAT WARNING printed, so you at
>>> least know you are attempting to shoot your extremities. :)
>>
>>
>> No, I wouldn't want that.
>> It's just that I thought the ports system
>> never uses anything from /usr/src.
>
>
> Well, only the ports that build kernel modules need it, as far as I
> know.  This is because in FreeBSD we do not install the 'full' kernel
> headers anywhere during installworld.
>
> Maybe we could adopt the Linux solution and dump them somewhere in a
> versioned directory. :)

Some system utilities, the most commonly noted is lsof(8), also
reference the source tree and will either not build or fail if the
source tree and the installed systems don't agree.
-- 
R. Kevin Oberman, Network Engineer
E-mail: kob6...@gmail.com
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: "/sys/conf/kmod.mk", line 111: Malformed conditional (${MK_CLANG_IS_CC}

2012-04-17 Thread Arno J. Klaassen

Hello,

[ /me not sure -current is the right group for this thread ]

Chris  writes:

> Hello,
>
> I recently updated my system from 8.2-STABLE to 9.0-STABLE and I'm
> seeing a similar error when trying to build the VirtualBox kernel
> module:
>
> *** Building 'vboxdrv' module ***
> "/usr/share/mk/bsd.own.mk", line 476: MK_CLANG_IS_CC can't be set by a
> user.
> *** Error code 1
>
> I tried the tips from all the previous posters with no luck. Any
> suggestions would greatly be appreciated!
>
> Chris

I have the same problem as Chris on a 9-STABLE box.


Dimitry Andric  writes:

> On 2012-04-17 01:08, Anton Shterenlikht wrote:
> ...
>> Just to say that I stumbled upon this issue as well:
>>
>> http://lists.freebsd.org/pipermail/freebsd-ports/2012-April/074409.html
>>
>> Subject: net/bwi-firmware-kmod "/sys/conf/kmod.mk", line 111: Malformed 
>> conditional (${MK_CLANG_IS_CC} == "no"&&  ${CC:T:Mclang} != "clang")
>
> The root cause is still that your kernel sources (in /sys) do not match
> your installed world.  The kernel module build process uses bsd.own.mk
> from /usr/share/mk, which should define MK_CLANG_IS_CC.  If it doesn't,
> but your kernel source references it, there is a mismatch.

I verified and re-verfied : kernel and world perfectly in sync; /usr/src
is a symlink but /sys points to the right place and (before patch)
/usr/share/mk/bsd.own.mk and /usr/src/share/mk/bsd.own.mk are
indentical.

Still I have to apply something like the following patch to get
VirtualBox kernel module compiled (no idea who/where MK_CLANG_IS_CC
gets set to "no", AFAIK not by me (I don't use src.conf and nothing
about CLANG in make.conf).

FYI, best regards, Arno

###

Index: ./share/mk/bsd.own.mk
===
RCS file: /home/ncvs/src/share/mk/bsd.own.mk,v
retrieving revision 1.107.2.5
diff -u -r1.107.2.5 bsd.own.mk
--- ./share/mk/bsd.own.mk   17 Mar 2012 22:29:05 -  1.107.2.5
+++ ./share/mk/bsd.own.mk   17 Apr 2012 15:45:00 -
@@ -472,8 +472,8 @@
 .if defined(WITH_${var}) && defined(WITHOUT_${var})
 .error WITH_${var} and WITHOUT_${var} can't both be set.
 .endif
-.if defined(MK_${var})
-.error MK_${var} can't be set by a user.
+.if defined(MK_${var}) && ${MK_${var}} != "no"
+.error MK_${var} (set to : ${MK_${var}} ) can't be set to no_default by a user.
 .endif
 .if defined(WITH_${var})
 MK_${var}:=yes

___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: "/sys/conf/kmod.mk", line 111: Malformed conditional (${MK_CLANG_IS_CC}

2012-04-17 Thread Mark Linimon
On Tue, Apr 17, 2012 at 11:49:44AM +0200, Dimitry Andric wrote:
> It would hopefully error out.  If you look in /usr/share/mk/bsd.kmod.mk,
> you will see this at the bottom:
> 
>   .if !defined(SYSDIR) || !exists(${SYSDIR}/kern/) || \
>   !exists(${SYSDIR}/conf/kmod.mk)
>   .error Unable to locate the kernel source tree. Set SYSDIR to override.
>   .endif
> 
> So, setting SYSDIR to the correct directory is also a possible solution.

Note that in ports-land we discourage .error in the ports infrastructure
as it can make it impossible to query metadata (e.g. make index,
make -V maintainer, etc.)  So this usage should stay in src.

mcl
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: "/sys/conf/kmod.mk", line 111: Malformed conditional (${MK_CLANG_IS_CC}

2012-04-17 Thread Anton Shterenlikht
On Tue, Apr 17, 2012 at 11:49:44AM +0200, Dimitry Andric wrote:
> On 2012-04-17 11:36, Anton Shterenlikht wrote:
> >On Tue, Apr 17, 2012 at 11:18:29AM +0200, Dimitry Andric wrote:
> ...
> >>That said, i think it may be time to bow to the pressure, and just put a
> >>fixup for this issue in kmod.mk, and the other .mk files, like I
> >>initially did in r232473, but with a BIG FAT WARNING printed, so you at
> >>least know you are attempting to shoot your extremities. :)
> >
> >No, I wouldn't want that.
> >It's just that I thought the ports system
> >never uses anything from /usr/src.
> 
> Well, only the ports that build kernel modules need it, as far as I
> know.  This is because in FreeBSD we do not install the 'full' kernel
> headers anywhere during installworld.
> 
> Maybe we could adopt the Linux solution and dump them somewhere in a
> versioned directory. :)
> 
> 
> >Perhaps the ports which do use /sys should
> >print a warning to the user. Something like
> >"before building this port, make sure your
> >installed world version matches the version
> >of your FreeBSD sources."
> >
> >By the way, what would happen if I try
> >to build those ports with no /sys at all?
> 
> It would hopefully error out.  If you look in /usr/share/mk/bsd.kmod.mk,
> you will see this at the bottom:
> 
>   .if !defined(SYSDIR) || !exists(${SYSDIR}/kern/) || \
>   !exists(${SYSDIR}/conf/kmod.mk)
>   .error Unable to locate the kernel source tree. Set SYSDIR to override.
>   .endif
> 
> So, setting SYSDIR to the correct directory is also a possible solution.

Ah.. I get it now.
So the ports that build kernel modules
invoke /usr/share/mk/bsd.kmod.mk, right?

So how about adding a warning to the user
(that /sys version must match the
installed world version) at the beginning
of this file?

Who maintains this file, @ports or @head?

-- 
Anton Shterenlikht
Room 2.6, Queen's Building
Mech Eng Dept
Bristol University
University Walk, Bristol BS8 1TR, UK
Tel: +44 (0)117 331 5944
Fax: +44 (0)117 929 4423
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: "/sys/conf/kmod.mk", line 111: Malformed conditional (${MK_CLANG_IS_CC}

2012-04-17 Thread Dimitry Andric

On 2012-04-17 11:36, Anton Shterenlikht wrote:

On Tue, Apr 17, 2012 at 11:18:29AM +0200, Dimitry Andric wrote:

...

That said, i think it may be time to bow to the pressure, and just put a
fixup for this issue in kmod.mk, and the other .mk files, like I
initially did in r232473, but with a BIG FAT WARNING printed, so you at
least know you are attempting to shoot your extremities. :)


No, I wouldn't want that.
It's just that I thought the ports system
never uses anything from /usr/src.


Well, only the ports that build kernel modules need it, as far as I
know.  This is because in FreeBSD we do not install the 'full' kernel
headers anywhere during installworld.

Maybe we could adopt the Linux solution and dump them somewhere in a
versioned directory. :)



Perhaps the ports which do use /sys should
print a warning to the user. Something like
"before building this port, make sure your
installed world version matches the version
of your FreeBSD sources."

By the way, what would happen if I try
to build those ports with no /sys at all?


It would hopefully error out.  If you look in /usr/share/mk/bsd.kmod.mk,
you will see this at the bottom:

  .if !defined(SYSDIR) || !exists(${SYSDIR}/kern/) || \
  !exists(${SYSDIR}/conf/kmod.mk)
  .error Unable to locate the kernel source tree. Set SYSDIR to override.
  .endif

So, setting SYSDIR to the correct directory is also a possible solution.
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: "/sys/conf/kmod.mk", line 111: Malformed conditional (${MK_CLANG_IS_CC}

2012-04-17 Thread Anton Shterenlikht
On Tue, Apr 17, 2012 at 11:18:29AM +0200, Dimitry Andric wrote:
> On 2012-04-17 01:08, Anton Shterenlikht wrote:
> ...
> >Just to say that I stumbled upon this issue as well:
> >
> >http://lists.freebsd.org/pipermail/freebsd-ports/2012-April/074409.html
> >
> >Subject: net/bwi-firmware-kmod "/sys/conf/kmod.mk", line 111: Malformed 
> >conditional (${MK_CLANG_IS_CC} == "no"&&  ${CC:T:Mclang} != "clang")
> 
> The root cause is still that your kernel sources (in /sys) do not match
> your installed world.  The kernel module build process uses bsd.own.mk
> from /usr/share/mk, which should define MK_CLANG_IS_CC.  If it doesn't,
> but your kernel source references it, there is a mismatch.
> 
> In some cases, you could fix it by setting MAKESYSPATH to the share/mk
> dir under your source tree.  There is still no guarantee your module
> will build or load correctly.
> 
> As Doug Barton said in reply to r232473: "Building ports where the
> sources and the installed kernel differ is not a supported
> configuration. The fact that it happens to work most of the time is a
> bonus."

Yes, my bad, just checked and my /usr/src doesn't match the kernel.

Thank you for the explanation.

> 
> That said, i think it may be time to bow to the pressure, and just put a
> fixup for this issue in kmod.mk, and the other .mk files, like I
> initially did in r232473, but with a BIG FAT WARNING printed, so you at
> least know you are attempting to shoot your extremities. :)

No, I wouldn't want that.
It's just that I thought the ports system
never uses anything from /usr/src.

Perhaps the ports which do use /sys should
print a warning to the user. Something like
"before building this port, make sure your
installed world version matches the version
of your FreeBSD sources."

By the way, what would happen if I try
to build those ports with no /sys at all?

-- 
Anton Shterenlikht
Room 2.6, Queen's Building
Mech Eng Dept
Bristol University
University Walk, Bristol BS8 1TR, UK
Tel: +44 (0)117 331 5944
Fax: +44 (0)117 929 4423
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: "/sys/conf/kmod.mk", line 111: Malformed conditional (${MK_CLANG_IS_CC}

2012-04-17 Thread Dimitry Andric

On 2012-04-17 01:08, Anton Shterenlikht wrote:
...

Just to say that I stumbled upon this issue as well:

http://lists.freebsd.org/pipermail/freebsd-ports/2012-April/074409.html

Subject: net/bwi-firmware-kmod "/sys/conf/kmod.mk", line 111: Malformed conditional (${MK_CLANG_IS_CC} == 
"no"&&  ${CC:T:Mclang} != "clang")


The root cause is still that your kernel sources (in /sys) do not match
your installed world.  The kernel module build process uses bsd.own.mk
from /usr/share/mk, which should define MK_CLANG_IS_CC.  If it doesn't,
but your kernel source references it, there is a mismatch.

In some cases, you could fix it by setting MAKESYSPATH to the share/mk
dir under your source tree.  There is still no guarantee your module
will build or load correctly.

As Doug Barton said in reply to r232473: "Building ports where the
sources and the installed kernel differ is not a supported
configuration. The fact that it happens to work most of the time is a
bonus."

That said, i think it may be time to bow to the pressure, and just put a
fixup for this issue in kmod.mk, and the other .mk files, like I
initially did in r232473, but with a BIG FAT WARNING printed, so you at
least know you are attempting to shoot your extremities. :)
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: "/sys/conf/kmod.mk", line 111: Malformed conditional (${MK_CLANG_IS_CC}

2012-04-16 Thread Anton Shterenlikht
On Mon, Apr 16, 2012 at 06:41:44PM -0400, Chris wrote:
> On Mon, Apr 16, 2012 at 2:45 AM, Dimitry Andric  wrote:
> > On 2012-04-16 03:03, Chris wrote:
> >>
> >> I recently updated my system from 8.2-STABLE to 9.0-STABLE and I'm
> >> seeing a similar error when trying to build the VirtualBox kernel
> >> module:
> >>
> >> *** Building 'vboxdrv' module ***
> >> "/usr/share/mk/bsd.own.mk", line 476: MK_CLANG_IS_CC can't be set by a
> >> user.
> >> *** Error code 1
> >>
> >> I tried the tips from all the previous posters with no luck. Any
> >> suggestions would greatly be appreciated!
> >
> >
> > It looks like this was caused by Maxim Sobolev's workaround here:
> >
> >  http://lists.freebsd.org/pipermail/cvs-ports/2012-April/24.html
> >
> > He attempts to set MK_ variables by hand, but that is obviously not
> > allowed.
> >
> > As has been said before, it is indeed possible to put a workaround for
> > compiling with the wrong source directory in bsd.own.mk, but that would
> > really help people to shoot themselves in the foot.
> >
> > It looks like the virtualbox-ose-kmod port sets a SRC_BASE variable to
> > the appropriate source directory, but it should probably also set the
> > MAKESYSPATH environment variable to ${SRC_BASE}/share/mk before invoking
> > make.
> >
> > Note this is still not 100% safe, as you would really need to build
> > using a toolchain corresponding to your kernel sources, but it's better
> > than nothing.
> 
> As a quick-n-dirty workaround, I deleted the three patch files
> mentioned in Maxim Sobolev's posting and the port compiles with no
> problems. It may be that the version of bsd.own.mk that I have fixes
> any compilation issues with clang.
> 
> Thanks for the help!
> 
> Chris

Just to say that I stumbled upon this issue as well:

http://lists.freebsd.org/pipermail/freebsd-ports/2012-April/074409.html

Subject: net/bwi-firmware-kmod "/sys/conf/kmod.mk", line 111: Malformed 
conditional (${MK_CLANG_IS_CC} == "no" && ${CC:T:Mclang} != "clang")

-- 
Anton Shterenlikht
Room 2.6, Queen's Building
Mech Eng Dept
Bristol University
University Walk, Bristol BS8 1TR, UK
Tel: +44 (0)117 331 5944
Fax: +44 (0)117 929 4423
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: "/sys/conf/kmod.mk", line 111: Malformed conditional (${MK_CLANG_IS_CC}

2012-04-16 Thread Chris
On Mon, Apr 16, 2012 at 2:45 AM, Dimitry Andric  wrote:
> On 2012-04-16 03:03, Chris wrote:
>>
>> I recently updated my system from 8.2-STABLE to 9.0-STABLE and I'm
>> seeing a similar error when trying to build the VirtualBox kernel
>> module:
>>
>> *** Building 'vboxdrv' module ***
>> "/usr/share/mk/bsd.own.mk", line 476: MK_CLANG_IS_CC can't be set by a
>> user.
>> *** Error code 1
>>
>> I tried the tips from all the previous posters with no luck. Any
>> suggestions would greatly be appreciated!
>
>
> It looks like this was caused by Maxim Sobolev's workaround here:
>
>  http://lists.freebsd.org/pipermail/cvs-ports/2012-April/24.html
>
> He attempts to set MK_ variables by hand, but that is obviously not
> allowed.
>
> As has been said before, it is indeed possible to put a workaround for
> compiling with the wrong source directory in bsd.own.mk, but that would
> really help people to shoot themselves in the foot.
>
> It looks like the virtualbox-ose-kmod port sets a SRC_BASE variable to
> the appropriate source directory, but it should probably also set the
> MAKESYSPATH environment variable to ${SRC_BASE}/share/mk before invoking
> make.
>
> Note this is still not 100% safe, as you would really need to build
> using a toolchain corresponding to your kernel sources, but it's better
> than nothing.

As a quick-n-dirty workaround, I deleted the three patch files
mentioned in Maxim Sobolev's posting and the port compiles with no
problems. It may be that the version of bsd.own.mk that I have fixes
any compilation issues with clang.

Thanks for the help!

Chris
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: "/sys/conf/kmod.mk", line 111: Malformed conditional (${MK_CLANG_IS_CC}

2012-04-15 Thread Dimitry Andric

On 2012-04-16 03:03, Chris wrote:

I recently updated my system from 8.2-STABLE to 9.0-STABLE and I'm
seeing a similar error when trying to build the VirtualBox kernel
module:

*** Building 'vboxdrv' module ***
"/usr/share/mk/bsd.own.mk", line 476: MK_CLANG_IS_CC can't be set by a user.
*** Error code 1

I tried the tips from all the previous posters with no luck. Any
suggestions would greatly be appreciated!


It looks like this was caused by Maxim Sobolev's workaround here:

  http://lists.freebsd.org/pipermail/cvs-ports/2012-April/24.html

He attempts to set MK_ variables by hand, but that is obviously not
allowed.

As has been said before, it is indeed possible to put a workaround for
compiling with the wrong source directory in bsd.own.mk, but that would
really help people to shoot themselves in the foot.

It looks like the virtualbox-ose-kmod port sets a SRC_BASE variable to
the appropriate source directory, but it should probably also set the
MAKESYSPATH environment variable to ${SRC_BASE}/share/mk before invoking
make.

Note this is still not 100% safe, as you would really need to build
using a toolchain corresponding to your kernel sources, but it's better
than nothing.
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: "/sys/conf/kmod.mk", line 111: Malformed conditional (${MK_CLANG_IS_CC}

2012-04-15 Thread Chris
Hello,

I recently updated my system from 8.2-STABLE to 9.0-STABLE and I'm
seeing a similar error when trying to build the VirtualBox kernel
module:

*** Building 'vboxdrv' module ***
"/usr/share/mk/bsd.own.mk", line 476: MK_CLANG_IS_CC can't be set by a user.
*** Error code 1

I tried the tips from all the previous posters with no luck. Any
suggestions would greatly be appreciated!

Chris

On Sat, Mar 3, 2012 at 10:43 AM, O. Hartmann
 wrote:
> On 03/03/12 15:19, Florian Smeets wrote:
>> On 03.03.12 14:24, Chris Rees wrote:
>>> On 3 March 2012 11:48, O. Hartmann  wrote:
>>>> On one of my FreeBSD 10.0-CURRENT boxes I receive this morning this
>>>> error message as shown below.
>>>>
>>>> I need to add, that I compiled the shown nvidia-driver hours ago on all
>>>> FreeBSD 9.0-STABLE boxes with the same settings and I compiled the
>>>> driver just two days before the same way I tried it this morning. What's
>>>> wrong?
>>>>
>>>> Some unexpected breakage? Then this is my shout to the community.
>>>>
>>>> Message below.
>>>>
>>>> Regards and thanks in advance,
>>>> Oliver
>>>>
>>>> ===>  Vulnerability check disabled, database not found
>>>> ===>  License NVIDIA accepted by the user
>>>> ===>  Found saved configuration for nvidia-driver-295.20
>>>> ===>  Extracting for nvidia-driver-295.20
>>>> => SHA256 Checksum OK for NVIDIA-FreeBSD-x86_64-295.20.tar.gz.
>>>> ===>  Patching for nvidia-driver-295.20
>>>> ===>   nvidia-driver-295.20 depends on file:
>>>> /usr/local/libdata/pkgconfig/xorg-server.pc - found
>>>> ===>   nvidia-driver-295.20 depends on shared library: GL.1 - found
>>>> ===>  Configuring for nvidia-driver-295.20
>>>> ===>  Building for nvidia-driver-295.20
>>>> ===> src (all)
>>>> "/sys/conf/kmod.mk", line 111: Malformed conditional (${MK_CLANG_IS_CC}
>>>> == "no" && ${CC:T:Mclang} != "clang")
>>>> "/sys/conf/kmod.mk", line 115: if-less endif
>>>> "/sys/conf/kern.mk", line 18: Malformed conditional (${MK_CLANG_IS_CC}
>>>> != "no" || ${CC:T:Mclang} == "clang")
>>>> "/sys/conf/kern.mk", line 31: if-less endif
>>>> "/sys/conf/kern.mk", line 101: Malformed conditional (${MK_CLANG_IS_CC}
>>>> == "no" && ${CC:T:Mclang} != "clang")
>>>> "/sys/conf/kern.mk", line 109: if-less endif
>>>> make: fatal errors encountered -- cannot continue
>>>> *** [all] Error code 1
>>>>
>>>
>>> Please post your make.conf and src.conf.
>>>
>>
>> No need, a buildworld / installworld cycle will fix it. A make install
>> in src/share/mk *could* also be enough, but i haven't tested it.
>>
>> Florian
>
>
> The last two attempts of "make -jX buildworld" (X=2) or just "make
> buildworld" failed.
>
> But issuing make install in /usr/src/share/mk made the failure go away.
>
> Thanks for the help.
>
> Where can I read more about how to fine tune /etc/src.conf and
> /etc/make.conf with new knobs?
>
> My /etc/src.conf looks like this (on FBSD 9 and 10):
>
> WITH_CLANG=             YES
> WITH_CLANG_EXTRAS=      YES
> #
> #CC=                    clang
> #CXX=                   clang++
> #CPP=                   clang-cpp
> #
> #CFLAGS.clang+=         -O3 -pipe -fno-strict-aliasing
> #COPTFLAGS.clang+=      -O3 -pipe
> #CFLAGS.cc+=            -O2 -pipe -fno-strict-aliasing
> #COPTFLAGS.cc+=         -O2 -pipe
> #
> WITH_BIND_LIBS=         YES
> WITH_BIND_SIGCHASE=     YES
> WITH_BIND_LARGE_FILE=   YES
> #
> WITH_IDEA=              YES
> WITH_HESIOD=            YES
> #
> #WITH_ICONV=            YES
> #WITH_BSD_GREP=         YES
> #
> WITH_LIBCPLUSPLUS=      YES
> #
> #WITH_OFED=             YES
>
> The CLANG relevant portion of /etc/make.conf looks like this:
>
> # BUGFIX FreeBSD 10.0
> #WITH_FBSD10_FIX=       YES
>
> #
> #DISABLE_MAKE_JOBS=     YES
>
> # Set to disable assertions and statistics gathering in malloc(3)
> MALLOC_PRODUCTION=      YES
>
> # Set this to use svn(1) to update your src tree with make update
> SVN_UPDATE=             YES
>
> # Program to use
> SVN=                    /usr/local/bin/svn
> SVNFLAGS=               -r HEAD
>
> #
> #PORTS_MODULES=         "x11/nvidia-driver"
&

Re: "/sys/conf/kmod.mk", line 111: Malformed conditional (${MK_CLANG_IS_CC}

2012-03-03 Thread O. Hartmann
On 03/03/12 15:19, Florian Smeets wrote:
> On 03.03.12 14:24, Chris Rees wrote:
>> On 3 March 2012 11:48, O. Hartmann  wrote:
>>> On one of my FreeBSD 10.0-CURRENT boxes I receive this morning this
>>> error message as shown below.
>>>
>>> I need to add, that I compiled the shown nvidia-driver hours ago on all
>>> FreeBSD 9.0-STABLE boxes with the same settings and I compiled the
>>> driver just two days before the same way I tried it this morning. What's
>>> wrong?
>>>
>>> Some unexpected breakage? Then this is my shout to the community.
>>>
>>> Message below.
>>>
>>> Regards and thanks in advance,
>>> Oliver
>>>
>>> ===>  Vulnerability check disabled, database not found
>>> ===>  License NVIDIA accepted by the user
>>> ===>  Found saved configuration for nvidia-driver-295.20
>>> ===>  Extracting for nvidia-driver-295.20
>>> => SHA256 Checksum OK for NVIDIA-FreeBSD-x86_64-295.20.tar.gz.
>>> ===>  Patching for nvidia-driver-295.20
>>> ===>   nvidia-driver-295.20 depends on file:
>>> /usr/local/libdata/pkgconfig/xorg-server.pc - found
>>> ===>   nvidia-driver-295.20 depends on shared library: GL.1 - found
>>> ===>  Configuring for nvidia-driver-295.20
>>> ===>  Building for nvidia-driver-295.20
>>> ===> src (all)
>>> "/sys/conf/kmod.mk", line 111: Malformed conditional (${MK_CLANG_IS_CC}
>>> == "no" && ${CC:T:Mclang} != "clang")
>>> "/sys/conf/kmod.mk", line 115: if-less endif
>>> "/sys/conf/kern.mk", line 18: Malformed conditional (${MK_CLANG_IS_CC}
>>> != "no" || ${CC:T:Mclang} == "clang")
>>> "/sys/conf/kern.mk", line 31: if-less endif
>>> "/sys/conf/kern.mk", line 101: Malformed conditional (${MK_CLANG_IS_CC}
>>> == "no" && ${CC:T:Mclang} != "clang")
>>> "/sys/conf/kern.mk", line 109: if-less endif
>>> make: fatal errors encountered -- cannot continue
>>> *** [all] Error code 1
>>>
>>
>> Please post your make.conf and src.conf.
>>
> 
> No need, a buildworld / installworld cycle will fix it. A make install
> in src/share/mk *could* also be enough, but i haven't tested it.
> 
> Florian


The last two attempts of "make -jX buildworld" (X=2) or just "make
buildworld" failed.

But issuing make install in /usr/src/share/mk made the failure go away.

Thanks for the help.

Where can I read more about how to fine tune /etc/src.conf and
/etc/make.conf with new knobs?

My /etc/src.conf looks like this (on FBSD 9 and 10):

WITH_CLANG= YES
WITH_CLANG_EXTRAS=  YES
#
#CC=clang
#CXX=   clang++
#CPP=   clang-cpp
#
#CFLAGS.clang+= -O3 -pipe -fno-strict-aliasing
#COPTFLAGS.clang+=  -O3 -pipe
#CFLAGS.cc+=-O2 -pipe -fno-strict-aliasing
#COPTFLAGS.cc+= -O2 -pipe
#
WITH_BIND_LIBS= YES
WITH_BIND_SIGCHASE= YES
WITH_BIND_LARGE_FILE=   YES
#
WITH_IDEA=  YES
WITH_HESIOD=YES
#
#WITH_ICONV=YES
#WITH_BSD_GREP= YES
#
WITH_LIBCPLUSPLUS=  YES
#
#WITH_OFED= YES

The CLANG relevant portion of /etc/make.conf looks like this:

# BUGFIX FreeBSD 10.0
#WITH_FBSD10_FIX=   YES

#
#DISABLE_MAKE_JOBS= YES

# Set to disable assertions and statistics gathering in malloc(3)
MALLOC_PRODUCTION=  YES

# Set this to use svn(1) to update your src tree with make update
SVN_UPDATE= YES

# Program to use
SVN=/usr/local/bin/svn
SVNFLAGS=   -r HEAD

#
#PORTS_MODULES= "x11/nvidia-driver"


###
### CLANG
###

.if !defined(NO_CLANG)
#.if ${.CURDIR:M/usr/src*} || ${.CURDIR:M/usr/obj*} || ${.CURDIR:M/sys*}
.if !defined(CC) || ${CC} == "cc"
CC= clang
.endif
.if !defined(CXX) || ${CXX} == "c++"
CXX=clang++
.endif
.if !defined(CPP) || ${CPP} == "cpp"
CPP=clang-cpp
.endif
## Don't die on warnings
NO_WERROR=
WERROR=
### Don't forget this when using Jails!
#NO_FSCHG=
#
CFLAGS+=-pipe -O3 -fno-strict-aliasing
COPTFLAGS+= -pipe -O3
#.endif
.endif



FORCE_PKG_REGISTER= YES
# OpenLDAP
#WANT_OPENLDAP_VER= 24
WANT_OPENLDAP_SASL= yes

# BDB Version
WITH_BDB_VER=   5
WITH_BDB_HIGHEST=   YES

# Rubin 1,9 wird Kaiser
RUBY_DEFAULT_VER=   1.9

# What PostgreSQL port should be set default
WANT_PGSQL_VER= 91

#
#FORCE_MAKE_JOBS=   YES

# Wir wollen SAMBA36 statt des senilen SAMABA35
SAMBA_

Re: "/sys/conf/kmod.mk", line 111: Malformed conditional (${MK_CLANG_IS_CC}

2012-03-03 Thread Dimitry Andric
On 2012-03-03 15:19, Florian Smeets wrote:
> On 03.03.12 14:24, Chris Rees wrote:
>> On 3 March 2012 11:48, O. Hartmann  wrote:
...
>>> "/sys/conf/kmod.mk", line 111: Malformed conditional (${MK_CLANG_IS_CC}
...
> No need, a buildworld / installworld cycle will fix it. A make install
> in src/share/mk *could* also be enough, but i haven't tested it.

It's also enough if you run "make buildenv" in your source directory,
before attempting to compile the module.  This is needed when you want
to build a module separately for -CURRENT on older stable branches.

Alternatively, use "make -m ${srcdir}/share/mk" or set the MAKESYSPATH
environment variable to ${srcdir}/share/mk before building.
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: "/sys/conf/kmod.mk", line 111: Malformed conditional (${MK_CLANG_IS_CC}

2012-03-03 Thread Florian Smeets
On 03.03.12 14:24, Chris Rees wrote:
> On 3 March 2012 11:48, O. Hartmann  wrote:
>> On one of my FreeBSD 10.0-CURRENT boxes I receive this morning this
>> error message as shown below.
>>
>> I need to add, that I compiled the shown nvidia-driver hours ago on all
>> FreeBSD 9.0-STABLE boxes with the same settings and I compiled the
>> driver just two days before the same way I tried it this morning. What's
>> wrong?
>>
>> Some unexpected breakage? Then this is my shout to the community.
>>
>> Message below.
>>
>> Regards and thanks in advance,
>> Oliver
>>
>> ===>  Vulnerability check disabled, database not found
>> ===>  License NVIDIA accepted by the user
>> ===>  Found saved configuration for nvidia-driver-295.20
>> ===>  Extracting for nvidia-driver-295.20
>> => SHA256 Checksum OK for NVIDIA-FreeBSD-x86_64-295.20.tar.gz.
>> ===>  Patching for nvidia-driver-295.20
>> ===>   nvidia-driver-295.20 depends on file:
>> /usr/local/libdata/pkgconfig/xorg-server.pc - found
>> ===>   nvidia-driver-295.20 depends on shared library: GL.1 - found
>> ===>  Configuring for nvidia-driver-295.20
>> ===>  Building for nvidia-driver-295.20
>> ===> src (all)
>> "/sys/conf/kmod.mk", line 111: Malformed conditional (${MK_CLANG_IS_CC}
>> == "no" && ${CC:T:Mclang} != "clang")
>> "/sys/conf/kmod.mk", line 115: if-less endif
>> "/sys/conf/kern.mk", line 18: Malformed conditional (${MK_CLANG_IS_CC}
>> != "no" || ${CC:T:Mclang} == "clang")
>> "/sys/conf/kern.mk", line 31: if-less endif
>> "/sys/conf/kern.mk", line 101: Malformed conditional (${MK_CLANG_IS_CC}
>> == "no" && ${CC:T:Mclang} != "clang")
>> "/sys/conf/kern.mk", line 109: if-less endif
>> make: fatal errors encountered -- cannot continue
>> *** [all] Error code 1
>>
> 
> Please post your make.conf and src.conf.
> 

No need, a buildworld / installworld cycle will fix it. A make install
in src/share/mk *could* also be enough, but i haven't tested it.

Florian



signature.asc
Description: OpenPGP digital signature


Re: "/sys/conf/kmod.mk", line 111: Malformed conditional (${MK_CLANG_IS_CC}

2012-03-03 Thread Dimitry Andric
On 2012-03-03 12:48, O. Hartmann wrote:
> On one of my FreeBSD 10.0-CURRENT boxes I receive this morning this
> error message as shown below.
> 
> I need to add, that I compiled the shown nvidia-driver hours ago on all
> FreeBSD 9.0-STABLE boxes with the same settings and I compiled the
> driver just two days before the same way I tried it this morning. What's
> wrong?
> 
> Some unexpected breakage? Then this is my shout to the community.
> 
> Message below.
> 
> Regards and thanks in advance,
> Oliver
> 
> ===>  Vulnerability check disabled, database not found
> ===>  License NVIDIA accepted by the user
> ===>  Found saved configuration for nvidia-driver-295.20
> ===>  Extracting for nvidia-driver-295.20
> => SHA256 Checksum OK for NVIDIA-FreeBSD-x86_64-295.20.tar.gz.
> ===>  Patching for nvidia-driver-295.20
> ===>   nvidia-driver-295.20 depends on file:
> /usr/local/libdata/pkgconfig/xorg-server.pc - found
> ===>   nvidia-driver-295.20 depends on shared library: GL.1 - found
> ===>  Configuring for nvidia-driver-295.20
> ===>  Building for nvidia-driver-295.20
> ===> src (all)
> "/sys/conf/kmod.mk", line 111: Malformed conditional (${MK_CLANG_IS_CC}
> == "no" && ${CC:T:Mclang} != "clang")
> "/sys/conf/kmod.mk", line 115: if-less endif
> "/sys/conf/kern.mk", line 18: Malformed conditional (${MK_CLANG_IS_CC}
> != "no" || ${CC:T:Mclang} == "clang")
> "/sys/conf/kern.mk", line 31: if-less endif
> "/sys/conf/kern.mk", line 101: Malformed conditional (${MK_CLANG_IS_CC}
> == "no" && ${CC:T:Mclang} != "clang")
> "/sys/conf/kern.mk", line 109: if-less endif
> make: fatal errors encountered -- cannot continue
> *** [all] Error code 1

Sigh, it looks like a lot of module building scripts are broken. :(

The problem is that in r232322, bsd.own.mk and bsd.sys.mk were updated,
to support the new WITH_CLANG_IS_CC setting.  This causes the macro
MK_CLANG_IS_CC to be defined.

However, this only works if Makefiles include the updated bsd.*.mk files
from your source directory, not if they include the old bsd.*.mk files
from /usr/share/mk.  Or at least, if you didn't already run "make
installworld" to update those .mk files.

As I said to somebody else who reported a similar problem, I can put a
workaround in kmod.mk and kern.mk, so that this incorrect way of module
building seems to work.  But it is still fundamentally broken.

Alternatively, I can put a message in there, which tells you to either
run make installworld, or use make buildenv before building the module(s).
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: "/sys/conf/kmod.mk", line 111: Malformed conditional (${MK_CLANG_IS_CC}

2012-03-03 Thread Chris Rees
On 3 March 2012 11:48, O. Hartmann  wrote:
> On one of my FreeBSD 10.0-CURRENT boxes I receive this morning this
> error message as shown below.
>
> I need to add, that I compiled the shown nvidia-driver hours ago on all
> FreeBSD 9.0-STABLE boxes with the same settings and I compiled the
> driver just two days before the same way I tried it this morning. What's
> wrong?
>
> Some unexpected breakage? Then this is my shout to the community.
>
> Message below.
>
> Regards and thanks in advance,
> Oliver
>
> ===>  Vulnerability check disabled, database not found
> ===>  License NVIDIA accepted by the user
> ===>  Found saved configuration for nvidia-driver-295.20
> ===>  Extracting for nvidia-driver-295.20
> => SHA256 Checksum OK for NVIDIA-FreeBSD-x86_64-295.20.tar.gz.
> ===>  Patching for nvidia-driver-295.20
> ===>   nvidia-driver-295.20 depends on file:
> /usr/local/libdata/pkgconfig/xorg-server.pc - found
> ===>   nvidia-driver-295.20 depends on shared library: GL.1 - found
> ===>  Configuring for nvidia-driver-295.20
> ===>  Building for nvidia-driver-295.20
> ===> src (all)
> "/sys/conf/kmod.mk", line 111: Malformed conditional (${MK_CLANG_IS_CC}
> == "no" && ${CC:T:Mclang} != "clang")
> "/sys/conf/kmod.mk", line 115: if-less endif
> "/sys/conf/kern.mk", line 18: Malformed conditional (${MK_CLANG_IS_CC}
> != "no" || ${CC:T:Mclang} == "clang")
> "/sys/conf/kern.mk", line 31: if-less endif
> "/sys/conf/kern.mk", line 101: Malformed conditional (${MK_CLANG_IS_CC}
> == "no" && ${CC:T:Mclang} != "clang")
> "/sys/conf/kern.mk", line 109: if-less endif
> make: fatal errors encountered -- cannot continue
> *** [all] Error code 1
>

Please post your make.conf and src.conf.

Chris
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


"/sys/conf/kmod.mk", line 111: Malformed conditional (${MK_CLANG_IS_CC}

2012-03-03 Thread O. Hartmann
On one of my FreeBSD 10.0-CURRENT boxes I receive this morning this
error message as shown below.

I need to add, that I compiled the shown nvidia-driver hours ago on all
FreeBSD 9.0-STABLE boxes with the same settings and I compiled the
driver just two days before the same way I tried it this morning. What's
wrong?

Some unexpected breakage? Then this is my shout to the community.

Message below.

Regards and thanks in advance,
Oliver

===>  Vulnerability check disabled, database not found
===>  License NVIDIA accepted by the user
===>  Found saved configuration for nvidia-driver-295.20
===>  Extracting for nvidia-driver-295.20
=> SHA256 Checksum OK for NVIDIA-FreeBSD-x86_64-295.20.tar.gz.
===>  Patching for nvidia-driver-295.20
===>   nvidia-driver-295.20 depends on file:
/usr/local/libdata/pkgconfig/xorg-server.pc - found
===>   nvidia-driver-295.20 depends on shared library: GL.1 - found
===>  Configuring for nvidia-driver-295.20
===>  Building for nvidia-driver-295.20
===> src (all)
"/sys/conf/kmod.mk", line 111: Malformed conditional (${MK_CLANG_IS_CC}
== "no" && ${CC:T:Mclang} != "clang")
"/sys/conf/kmod.mk", line 115: if-less endif
"/sys/conf/kern.mk", line 18: Malformed conditional (${MK_CLANG_IS_CC}
!= "no" || ${CC:T:Mclang} == "clang")
"/sys/conf/kern.mk", line 31: if-less endif
"/sys/conf/kern.mk", line 101: Malformed conditional (${MK_CLANG_IS_CC}
== "no" && ${CC:T:Mclang} != "clang")
"/sys/conf/kern.mk", line 109: if-less endif
make: fatal errors encountered -- cannot continue
*** [all] Error code 1

Stop in /usr/ports/x11/nvidia-driver/work/NVIDIA-FreeBSD-x86_64-295.20.



signature.asc
Description: OpenPGP digital signature