Re: FreeBSD-head-riscv64-build - Build #9623 (r336573) - Failure

2018-07-21 Thread Li-Wen Hsu
On Sun, Jul 22, 2018 at 02:18:32 +0300, Konstantin Belousov wrote:
> On Sat, Jul 21, 2018 at 02:16:17AM +, jenkins-ad...@freebsd.org wrote:
> > --- lib/ofed/libmlx5__L ---
> > In file included from /workspace/src/contrib/ofed/libmlx5/mlx5.h:44:0,
> >  from /workspace/src/contrib/ofed/libmlx5/buf.c:42:
> > /workspace/obj/workspace/src/riscv.riscv64/tmp/usr/include/infiniband/udma_barrier.h:108:2:
> >  error: #error No architecture specific memory barrier defines found!
> >  #error No architecture specific memory barrier defines found!
> >   ^
> 
> The patch below should be enough to fix the build,  modulo the syntax
> errors which I cannot check.  The reason is that it seems riscv is not
> cross-buildable from stable/11 host:
> --- includes_subdir_include/rpcsvc ---
> RPCGEN_CPP=cpp\ -target\ riscv64-unknown-freebsd12.0\ 
> --sysroot=/usr/home/konstantinb/build/bsd/DEV/obj/usr/home/konstantinb/build/bsd/DEV/src/riscv.riscv64/tmp\
>  -B/usr/local rpcgen -C -h -DWANT_NFS3 
> /usr/home/konstantinb/build/bsd/DEV/src/include/rpcsvc/klm_prot.x -o 
> klm_prot.h
> --- key_prot.h ---
> error: unknown target triple 'riscv64-unknown-freebsd12.0', please use 
> -triple or -arch
> *** [key_prot.h] Error code 1
> 
> make[4]: stopped in /usr/home/konstantinb/build/bsd/DEV/src/include/rpcsvc
> 
> So if somebody who care about riscv and can build the world could
> confirm the fix, I will commit it.
> 
> diff --git a/contrib/ofed/include/udma_barrier.h 
> b/contrib/ofed/include/udma_barrier.h
> index 71d264f8dce..6709d4433a7 100644
> --- a/contrib/ofed/include/udma_barrier.h
> +++ b/contrib/ofed/include/udma_barrier.h
> @@ -104,6 +104,10 @@
>  #include 
>  #include 
>  #define udma_to_device_barrier() dmb()
> +#elif defined(__riscv__)
> +#include 
> +#include 
> +#define  udma_to_device_barrier() fence()
>  #else
>  #error No architecture specific memory barrier defines found!
>  #endif

Thanks for looking into this.  Attached patch is slightly modified.
RISC-V is using __riscv and there are few more atomic macros need to be
defined.

However this seems not enough, there are some c++ errors which may take
longer to fix:

In file included from 
/usr/home/lwhsu/freebsd-src/contrib/ofed/librdmacm/cma.h:43:0,
 from 
/usr/home/lwhsu/freebsd-src/contrib/ofed/librdmacm/acm.c:42:
/usr/home/lwhsu/freebsd-src/contrib/ofed/librdmacm/cma.h: In function 
'fastlock_init':
/usr/home/lwhsu/freebsd-src/contrib/ofed/librdmacm/cma.h:60:2: error: invalid 
initializer
  atomic_store(>cnt, 0);
  ^
In file included from 
/usr/home/lwhsu/freebsd-src/contrib/ofed/librdmacm/acm.c:42:0:
/usr/home/lwhsu/freebsd-src/contrib/ofed/librdmacm/cma.h: In function 
'fastlock_acquire':
/usr/home/lwhsu/freebsd-src/contrib/ofed/librdmacm/cma.h:68:2: error: operand 
type 'struct  *' is incompatible with argument 1 of 
'__atomic_fetch_add'
  if (atomic_fetch_add(>cnt, 1) > 0)
  ^~
/usr/home/lwhsu/freebsd-src/contrib/ofed/librdmacm/cma.h: In function 
'fastlock_release':
/usr/home/lwhsu/freebsd-src/contrib/ofed/librdmacm/cma.h:73:2: error: operand 
type 'struct  *' is incompatible with argument 1 of 
'__atomic_fetch_sub'
  if (atomic_fetch_sub(>cnt, 1) > 1)
  ^~
*** [acm.o] Error code 1

make[6]: stopped in /usr/home/lwhsu/freebsd-src/lib/ofed/librdmacm


BTW, stable/11 should be fine to cross-build riscv64, this job uses
11.2-RELEASE and riscv64-xtoolchain-gcc package, with
CROSS_TOOLCHAIN=riscv64-gcc defined.


Best,
Li-Wen

-- 
Li-Wen Hsu 
https://lwhsu.org
Index: contrib/ofed/include/udma_barrier.h
===
--- contrib/ofed/include/udma_barrier.h	(revision 336593)
+++ contrib/ofed/include/udma_barrier.h	(working copy)
@@ -104,6 +104,10 @@
 #include 
 #include 
 #define udma_to_device_barrier() dmb()
+#elif defined(__riscv)
+#include 
+#include 
+#define udma_to_device_barrier() fence()
 #else
 #error No architecture specific memory barrier defines found!
 #endif
@@ -140,6 +144,8 @@
 #define udma_from_device_barrier() mips_sync()
 #elif defined(__arm__)
 #define udma_from_device_barrier() dmb()
+#elif defined(__riscv)
+#define udma_from_device_barrier() fence()
 #else
 #error No architecture specific memory barrier defines found!
 #endif
@@ -208,6 +214,8 @@
 #define mmio_flush_writes() mips_sync()
 #elif defined(__arm__)
 #define mmio_flush_writes() dmb()
+#elif defined(__riscv)
+#define mmio_flush_writes() fence()
 #else
 #error No architecture specific memory barrier defines found!
 #endif
___
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: ntpd as ntpd user question

2018-07-21 Thread Herbert J. Skuhra
On Sat, Jul 21, 2018 at 03:09:26PM -0700, bob prohaska wrote:
> On Sat, Jul 21, 2018 at 12:14:10PM -0600, Ian Lepore wrote:
> > 
> > I can't see any way that installkernel would lead to the complaint
> > about the ntpd user not existing; that check is tied to the
> > installworld target.
> > 
> My mistake. I was sleepy and in a hurry. The error message was in installworld
> and my attempt to adduser ntpd concluded with an error:
> Locked : yes
> OK? (yes/no): yes
> pw: Bad id 'ntpd': invalid
> adduser: ERROR: There was an error adding user (ntpd).
> On reboot the old ntpd set the clock and I thought all was well.
> 
> The failure is a little surprising, is ntpd a reserved name?

Why? You obviously entered the string "ntpd" instead of an integer when
asked for the uid!?

> The machine is re-running buildworld/installworld from a clean start,
> so presumably it'll halt over the same error again. When that happens, 
> what's the simplest way to recover? Mergemaster is a big hammer, something
> less comprehensive might suffice, even manual editing of files.

In this case 'mergemaster -p' is enough.

-- 
Herbert
___
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: FreeBSD-head-riscv64-build - Build #9623 (r336573) - Failure

2018-07-21 Thread Konstantin Belousov
On Sat, Jul 21, 2018 at 02:16:17AM +, jenkins-ad...@freebsd.org wrote:
> --- lib/ofed/libmlx5__L ---
> In file included from /workspace/src/contrib/ofed/libmlx5/mlx5.h:44:0,
>  from /workspace/src/contrib/ofed/libmlx5/buf.c:42:
> /workspace/obj/workspace/src/riscv.riscv64/tmp/usr/include/infiniband/udma_barrier.h:108:2:
>  error: #error No architecture specific memory barrier defines found!
>  #error No architecture specific memory barrier defines found!
>   ^

The patch below should be enough to fix the build,  modulo the syntax
errors which I cannot check.  The reason is that it seems riscv is not
cross-buildable from stable/11 host:
--- includes_subdir_include/rpcsvc ---
RPCGEN_CPP=cpp\ -target\ riscv64-unknown-freebsd12.0\ 
--sysroot=/usr/home/konstantinb/build/bsd/DEV/obj/usr/home/konstantinb/build/bsd/DEV/src/riscv.riscv64/tmp\
 -B/usr/local rpcgen -C -h -DWANT_NFS3 
/usr/home/konstantinb/build/bsd/DEV/src/include/rpcsvc/klm_prot.x -o klm_prot.h
--- key_prot.h ---
error: unknown target triple 'riscv64-unknown-freebsd12.0', please use -triple 
or -arch
*** [key_prot.h] Error code 1

make[4]: stopped in /usr/home/konstantinb/build/bsd/DEV/src/include/rpcsvc

So if somebody who care about riscv and can build the world could
confirm the fix, I will commit it.

diff --git a/contrib/ofed/include/udma_barrier.h 
b/contrib/ofed/include/udma_barrier.h
index 71d264f8dce..6709d4433a7 100644
--- a/contrib/ofed/include/udma_barrier.h
+++ b/contrib/ofed/include/udma_barrier.h
@@ -104,6 +104,10 @@
 #include 
 #include 
 #define udma_to_device_barrier() dmb()
+#elif defined(__riscv__)
+#include 
+#include 
+#defineudma_to_device_barrier() fence()
 #else
 #error No architecture specific memory barrier defines found!
 #endif
___
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: ntpd as ntpd user question

2018-07-21 Thread bob prohaska
On Sat, Jul 21, 2018 at 12:14:10PM -0600, Ian Lepore wrote:
> 
> I can't see any way that installkernel would lead to the complaint
> about the ntpd user not existing; that check is tied to the
> installworld target.
> 
My mistake. I was sleepy and in a hurry. The error message was in installworld
and my attempt to adduser ntpd concluded with an error:
Locked : yes
OK? (yes/no): yes
pw: Bad id 'ntpd': invalid
adduser: ERROR: There was an error adding user (ntpd).
On reboot the old ntpd set the clock and I thought all was well.

The failure is a little surprising, is ntpd a reserved name?

The machine is re-running buildworld/installworld from a clean start,
so presumably it'll halt over the same error again. When that happens, 
what's the simplest way to recover? Mergemaster is a big hammer, something
less comprehensive might suffice, even manual editing of files.  

There's minimal customization on the machine, basically /etc/fstab, 
/etc/rc.conf and /etc/passwd. Nothing else of real value, so if I kill 
it in the attempt it won't be a disaster.


Thanks for waking me to my blunder...

bob prohaska
 
___
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: gcc/clang interoperability problem with a custom "samba" build in recent -current.

2018-07-21 Thread Dimitry Andric
On 21 Jul 2018, at 21:11, Yuri Pankov  wrote:
> 
> Yuri Pankov wrote:
>> Julian Elischer wrote:
...
 anyone know if there is a clang equivalent of -Wp, -E,-lang-asm?
>> In later GCC versions the cpp's -lang-asm seems to be deprecated in
>> favor of -x assembler-with-cpp as it conflicts with -l option.
>> Could you try changing the -Wp,-E,-lang-asm to -Wp,-E,-xassembler-with-cpp?
> 
> Just tried it myself, and if you indeed mean the 
> third_party/aesni-intel/aesni-intel_asm.c, the following seems to work for me:
> 
> clang -xassembler-with-cpp -c third_party/aesni-intel/aesni-intel_asm.c

Yes, that is exactly what I suggested to Julian on IRC.  The point is
that the ".c" extension is misleading, it should more likely be a ".S"
extension.  But maybe this source file is used for multiple purposes.

Note that -x assembler-with-cpp should also work fine for gcc.

-Dimitry



signature.asc
Description: Message signed with OpenPGP


Re: gcc/clang interoperability problem with a custom "samba" build in recent -current.

2018-07-21 Thread Yuri Pankov

Yuri Pankov wrote:

Julian Elischer wrote:

I would really like ot get some pointers as to who are our tools
committers at the moment, in particular who might know about these issues.
The main issue for me at the moment is the ability to compile the
aesni code in Samba from clang..

Julian


On 20/7/18 7:32 pm, Julian Elischer wrote:

compiling our samba with gcc 4.2.1 in 12 gave us some off behaviour
when lld became the linker I think..

1/ linking needed some directories added to some of the build
scripts because previously apparently it looked in $SYSROOT/usr/lib
by default and now it doesn't.

2/ compiling our samba produces a libtdb.so that has various symbols
in it, (according to nm(1) ), but when we try link against it we get
complaints about those symbols not being defined.

3/ an attempt to switch to using clang to compile everything leads to:


"--aes-accel=intelaesni selected and compiler rejects -Wp,-E,-lang-asm.

One wonders whether there is a clang equivalent of "-Wp,-E,-lang-asm"

The AES acceleration is a configure option for the samba package.

Apparently turning it on requires -Wp,-E,-lang-asm.

which apparently gcc 4.2.1 has, but clang doesn't have.

     FreeBSD clang version 6.0.1 (tags/RELEASE_601/final 335540) (based
     on LLVM 6.0.1)
     Target: x86_64-unknown-freebsd12.0
     Thread model: posix
     InstalledDir: /usr/bin

anyone know if there is a clang equivalent of -Wp, -E,-lang-asm?


In later GCC versions the cpp's -lang-asm seems to be deprecated in
favor of -x assembler-with-cpp as it conflicts with -l option.

Could you try changing the -Wp,-E,-lang-asm to -Wp,-E,-xassembler-with-cpp?


Just tried it myself, and if you indeed mean the 
third_party/aesni-intel/aesni-intel_asm.c, the following seems to work 
for me:


clang -xassembler-with-cpp -c third_party/aesni-intel/aesni-intel_asm.c


possible work arrounds include:

1/ Get gcc/lld to produce a library from which lld can find the symbols

2/ find a way to compile this with clang but everything else with gcc?

3/ find a way to allow clang to use
-Wp,-E,-lang-asm

whatever that means


Thoughts from any tools people?


___
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: ntpd as ntpd user question

2018-07-21 Thread Cy Schubert
What's the difference?

---
Sent using a tiny phone keyboard.
Apologies for any typos and autocorrect.
Also, this old phone only supports top post. Apologies.

Cy Schubert
 or 
The need of the many outweighs the greed of the few.
---

-Original Message-
From: RW
Sent: 21/07/2018 10:59
To: freebsd-current@freebsd.org
Subject: Re: ntpd as ntpd user question

On Sat, 21 Jul 2018 11:14:45 -0600
Ian Lepore wrote:


> There's a "pre-world" stage of mergemaster (-Fp option I think) which
> isn't needed often, but one of the times it is needed is apparently
> when new user ids are added.  

I wish mergemaster had an option to just add new users and groups,
rather than merging the files. 
___
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"
___
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: ntpd as ntpd user question

2018-07-21 Thread Cy Schubert
This is why you need to run pre-world mergemaster.

---
Sent using a tiny phone keyboard.
Apologies for any typos and autocorrect.
Also, this old phone only supports top post. Apologies.

Cy Schubert
 or 
The need of the many outweighs the greed of the few.
---

-Original Message-
From: bob prohaska
Sent: 21/07/2018 10:49
To: Ian Lepore
Cc: Pete Wright; FreeBSD Current; bob prohaska
Subject: Re: ntpd as ntpd user question

On Sat, Jul 21, 2018 at 11:14:45AM -0600, Ian Lepore wrote:
> 
> There's a "pre-world" stage of mergemaster (-Fp option I think) which
> isn't needed often, but one of the times it is needed is apparently
> when new user ids are added. ?(So I've been told, I've never much used
> mergemaster myself). I think there are some words about it at the very
> bottom of UPDATING.
> 

FWIW, installkernel stopped with the note about needing an ntpd user/group.
Never having been successful with mergemaster (couldn't make heads nor tails
of the "what to do" prompts) I just ran adduser, creating a locked ntpd user
and group. Nothing else special done. The machine is up to r336567 on arm64.

Installkernel ran, I didn't touch anthing in /etc manually and reboot looked 
normal.
For now it seems ignorance is bliss

If there's something special I should do (beyond locking) to secure the ntpd 
account please warn me.

Thanks for reading,

bob prohaska

___
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"

___
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: ntpd as ntpd user question

2018-07-21 Thread Pete Wright



On 07/21/2018 10:14, Ian Lepore wrote:

On Sat, 2018-07-21 at 10:11 -0700, Pete Wright wrote:

On 07/21/2018 09:47, Ian Lepore wrote:

On Sat, 2018-07-21 at 09:41 -0700, Pete Wright wrote:

hello - i am testing out the new ntpd that was committed
yesterday and
am attempting to run as non-root.  i've created a ntpd
user/group, and
verified permissions look good on pertinent directories.  i am
running
into an issue with the rc script tho - it's complaining about
multiple
pid files being specified?

$ sudo /etc/rc.d/ntpd start
Starting ntpd.
ntpd error:  only one pidfile option allowed
ntpd - NTP daemon program - Ver. 4.2.8p11
Usage:  ntpd [ - [] | --[{=| }] ]... \
       [  ...  ]
Try 'ntpd --help' for more information.
/etc/rc.d/ntpd: WARNING: failed to start ntpd


has anyone else seen this issue? not sure if this is an issue
with my
local config or not, i've read through the rc script and its not
obvious
to me yet why it may be getting multiple pid arguments passed.
the only
relevant bit i have set in rc.conf is:

$ grep ntpd /etc/rc.conf
ntpd_enable="YES"


thanks!
-pete


You say you created an ntpd user/group, that seems to imply you
didn't
run mergemaster (which would have done that). If that's the case,
you
probably also didn't get /etc/defaults/rc.conf updated, so it still
has
the old ntpd_flags that includes the pidfile (which is now provided
by
the startup script and shouldn't be set in ntpd_flags).

If all of that is the wrong guess, let me know and we'll figure it
out.

that's Ian - that's most likely it (defaults/rc.conf).  i did run
mergemaster but i suspect i didn't run it correctly b/c it didn't
copy
over any files, nor create the ntpd uid/gid.  my buildworld script
does
a "mergemaster -m $CHECKOUT -a".  i'll re-read the man page today
and
update my scripts accordingly.

thanks again for the bread-crumb!
-pete


There's a "pre-world" stage of mergemaster (-Fp option I think) which
isn't needed often, but one of the times it is needed is apparently
when new user ids are added.  (So I've been told, I've never much used
mergemaster myself). I think there are some words about it at the very
bottom of UPDATING.


so i was running the "pre-world" mergemaster, but i think what bit me 
was relying on the "-a" switch.  after reading UPDATING as you suggested 
i re-ran mergemaster like so:


"sudo mergemaster -m $CHECKOUT -rvF"

which seems closer in-line with the documentation.  i had a ton of stuff 
missing, which would explain some funky behaviour i've seen in regards 
to devd, so glad i sorted this out.


as someone RW mentions later in this thread, it would be sweet if 
mergemaster could auto add users/groups.  i missed this in the diff 
during my pre-installworld mergemaster run.  easily fixed - but def 
something i'll have to keep my eye out for.


cheers,
-pete

--
Pete Wright
p...@nomadlogic.org
@nomadlogicLA

___
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: ntpd as ntpd user question

2018-07-21 Thread Ian Lepore
On Sat, 2018-07-21 at 10:47 -0700, bob prohaska wrote:
> On Sat, Jul 21, 2018 at 11:14:45AM -0600, Ian Lepore wrote:
> > 
> > 
> > There's a "pre-world" stage of mergemaster (-Fp option I think) which
> > isn't needed often, but one of the times it is needed is apparently
> > when new user ids are added. ?(So I've been told, I've never much used
> > mergemaster myself). I think there are some words about it at the very
> > bottom of UPDATING.
> > 
> FWIW, installkernel stopped with the note about needing an ntpd user/group.
> Never having been successful with mergemaster (couldn't make heads nor tails
> of the "what to do" prompts) I just ran adduser, creating a locked ntpd user
> and group. Nothing else special done. The machine is up to r336567 on arm64.
> 
> Installkernel ran, I didn't touch anthing in /etc manually and reboot looked 
> normal.
> For now it seems ignorance is bliss
> 
> If there's something special I should do (beyond locking) to secure the ntpd 
> account please warn me.
> 
> Thanks for reading,
> 
> bob prohaska

I can't see any way that installkernel would lead to the complaint
about the ntpd user not existing; that check is tied to the
installworld target.

A quick way to check whether ntpd is running as ntpd user:

 procstat cred `pgrep ntpd`

 PID  COMM  EUID  RUID SVUID  EGID  RGID SVGID UMASK FLAGS GROUPS
 1176 ntpd   123   123   123   123   123   123   022 - 123

-- Ian
___
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: ntpd as ntpd user question

2018-07-21 Thread RW
On Sat, 21 Jul 2018 11:14:45 -0600
Ian Lepore wrote:


> There's a "pre-world" stage of mergemaster (-Fp option I think) which
> isn't needed often, but one of the times it is needed is apparently
> when new user ids are added.  

I wish mergemaster had an option to just add new users and groups,
rather than merging the files. 
___
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: ntpd as ntpd user question

2018-07-21 Thread bob prohaska
On Sat, Jul 21, 2018 at 11:14:45AM -0600, Ian Lepore wrote:
> 
> There's a "pre-world" stage of mergemaster (-Fp option I think) which
> isn't needed often, but one of the times it is needed is apparently
> when new user ids are added. ?(So I've been told, I've never much used
> mergemaster myself). I think there are some words about it at the very
> bottom of UPDATING.
> 

FWIW, installkernel stopped with the note about needing an ntpd user/group.
Never having been successful with mergemaster (couldn't make heads nor tails
of the "what to do" prompts) I just ran adduser, creating a locked ntpd user
and group. Nothing else special done. The machine is up to r336567 on arm64.

Installkernel ran, I didn't touch anthing in /etc manually and reboot looked 
normal.
For now it seems ignorance is bliss

If there's something special I should do (beyond locking) to secure the ntpd 
account please warn me.

Thanks for reading,

bob prohaska

___
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: ntpd as ntpd user question

2018-07-21 Thread Ian Lepore
On Sat, 2018-07-21 at 10:11 -0700, Pete Wright wrote:
> 
> On 07/21/2018 09:47, Ian Lepore wrote:
> > 
> > On Sat, 2018-07-21 at 09:41 -0700, Pete Wright wrote:
> > > 
> > > hello - i am testing out the new ntpd that was committed
> > > yesterday and
> > > am attempting to run as non-root.  i've created a ntpd
> > > user/group, and
> > > verified permissions look good on pertinent directories.  i am
> > > running
> > > into an issue with the rc script tho - it's complaining about
> > > multiple
> > > pid files being specified?
> > > 
> > > $ sudo /etc/rc.d/ntpd start
> > > Starting ntpd.
> > > ntpd error:  only one pidfile option allowed
> > > ntpd - NTP daemon program - Ver. 4.2.8p11
> > > Usage:  ntpd [ - [] | --[{=| }] ]... \
> > >       [  ...  ]
> > > Try 'ntpd --help' for more information.
> > > /etc/rc.d/ntpd: WARNING: failed to start ntpd
> > > 
> > > 
> > > has anyone else seen this issue? not sure if this is an issue
> > > with my
> > > local config or not, i've read through the rc script and its not
> > > obvious
> > > to me yet why it may be getting multiple pid arguments passed. 
> > > the only
> > > relevant bit i have set in rc.conf is:
> > > 
> > > $ grep ntpd /etc/rc.conf
> > > ntpd_enable="YES"
> > > 
> > > 
> > > thanks!
> > > -pete
> > > 
> > You say you created an ntpd user/group, that seems to imply you
> > didn't
> > run mergemaster (which would have done that). If that's the case,
> > you
> > probably also didn't get /etc/defaults/rc.conf updated, so it still
> > has
> > the old ntpd_flags that includes the pidfile (which is now provided
> > by
> > the startup script and shouldn't be set in ntpd_flags).
> > 
> > If all of that is the wrong guess, let me know and we'll figure it
> > out.
> that's Ian - that's most likely it (defaults/rc.conf).  i did run 
> mergemaster but i suspect i didn't run it correctly b/c it didn't
> copy 
> over any files, nor create the ntpd uid/gid.  my buildworld script
> does 
> a "mergemaster -m $CHECKOUT -a".  i'll re-read the man page today
> and 
> update my scripts accordingly.
> 
> thanks again for the bread-crumb!
> -pete
> 

There's a "pre-world" stage of mergemaster (-Fp option I think) which
isn't needed often, but one of the times it is needed is apparently
when new user ids are added.  (So I've been told, I've never much used
mergemaster myself). I think there are some words about it at the very
bottom of UPDATING.

-- Ian
___
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: ntpd as ntpd user question

2018-07-21 Thread Pete Wright



On 07/21/2018 09:47, Ian Lepore wrote:

On Sat, 2018-07-21 at 09:41 -0700, Pete Wright wrote:

hello - i am testing out the new ntpd that was committed yesterday and
am attempting to run as non-root.  i've created a ntpd user/group, and
verified permissions look good on pertinent directories.  i am running
into an issue with the rc script tho - it's complaining about multiple
pid files being specified?

$ sudo /etc/rc.d/ntpd start
Starting ntpd.
ntpd error:  only one pidfile option allowed
ntpd - NTP daemon program - Ver. 4.2.8p11
Usage:  ntpd [ - [] | --[{=| }] ]... \
      [  ...  ]
Try 'ntpd --help' for more information.
/etc/rc.d/ntpd: WARNING: failed to start ntpd


has anyone else seen this issue? not sure if this is an issue with my
local config or not, i've read through the rc script and its not obvious
to me yet why it may be getting multiple pid arguments passed.  the only
relevant bit i have set in rc.conf is:

$ grep ntpd /etc/rc.conf
ntpd_enable="YES"


thanks!
-pete


You say you created an ntpd user/group, that seems to imply you didn't
run mergemaster (which would have done that). If that's the case, you
probably also didn't get /etc/defaults/rc.conf updated, so it still has
the old ntpd_flags that includes the pidfile (which is now provided by
the startup script and shouldn't be set in ntpd_flags).

If all of that is the wrong guess, let me know and we'll figure it out.


that's Ian - that's most likely it (defaults/rc.conf).  i did run 
mergemaster but i suspect i didn't run it correctly b/c it didn't copy 
over any files, nor create the ntpd uid/gid.  my buildworld script does 
a "mergemaster -m $CHECKOUT -a".  i'll re-read the man page today and 
update my scripts accordingly.


thanks again for the bread-crumb!
-pete

--
Pete Wright
p...@nomadlogic.org
@nomadlogicLA

___
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: ntpd as ntpd user question

2018-07-21 Thread Ian Lepore
On Sat, 2018-07-21 at 09:41 -0700, Pete Wright wrote:
> hello - i am testing out the new ntpd that was committed yesterday and 
> am attempting to run as non-root.  i've created a ntpd user/group, and 
> verified permissions look good on pertinent directories.  i am running 
> into an issue with the rc script tho - it's complaining about multiple 
> pid files being specified?
> 
> $ sudo /etc/rc.d/ntpd start
> Starting ntpd.
> ntpd error:  only one pidfile option allowed
> ntpd - NTP daemon program - Ver. 4.2.8p11
> Usage:  ntpd [ - [] | --[{=| }] ]... \
>      [  ...  ]
> Try 'ntpd --help' for more information.
> /etc/rc.d/ntpd: WARNING: failed to start ntpd
> 
> 
> has anyone else seen this issue? not sure if this is an issue with my 
> local config or not, i've read through the rc script and its not obvious 
> to me yet why it may be getting multiple pid arguments passed.  the only 
> relevant bit i have set in rc.conf is:
> 
> $ grep ntpd /etc/rc.conf
> ntpd_enable="YES"
> 
> 
> thanks!
> -pete
> 

You say you created an ntpd user/group, that seems to imply you didn't
run mergemaster (which would have done that). If that's the case, you
probably also didn't get /etc/defaults/rc.conf updated, so it still has
the old ntpd_flags that includes the pidfile (which is now provided by
the startup script and shouldn't be set in ntpd_flags).

If all of that is the wrong guess, let me know and we'll figure it out.

-- Ian

___
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"


ntpd as ntpd user question

2018-07-21 Thread Pete Wright
hello - i am testing out the new ntpd that was committed yesterday and 
am attempting to run as non-root.  i've created a ntpd user/group, and 
verified permissions look good on pertinent directories.  i am running 
into an issue with the rc script tho - it's complaining about multiple 
pid files being specified?


$ sudo /etc/rc.d/ntpd start
Starting ntpd.
ntpd error:  only one pidfile option allowed
ntpd - NTP daemon program - Ver. 4.2.8p11
Usage:  ntpd [ - [] | --[{=| }] ]... \
        [  ...  ]
Try 'ntpd --help' for more information.
/etc/rc.d/ntpd: WARNING: failed to start ntpd


has anyone else seen this issue? not sure if this is an issue with my 
local config or not, i've read through the rc script and its not obvious 
to me yet why it may be getting multiple pid arguments passed.  the only 
relevant bit i have set in rc.conf is:


$ grep ntpd /etc/rc.conf
ntpd_enable="YES"


thanks!
-pete

--
Pete Wright
p...@nomadlogic.org
@nomadlogicLA

___
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: gcc/clang interoperability problem with a custom "samba" build in recent -current.

2018-07-21 Thread Yuri Pankov

Julian Elischer wrote:

I would really like ot get some pointers as to who are our tools
committers at the moment, in particular who might know about these issues.
The main issue for me at the moment is the ability to compile the
aesni code in Samba from clang..

Julian


On 20/7/18 7:32 pm, Julian Elischer wrote:

compiling our samba with gcc 4.2.1 in 12 gave us some off behaviour
when lld became the linker I think..

1/ linking needed some directories added to some of the build
scripts because previously apparently it looked in $SYSROOT/usr/lib
by default and now it doesn't.

2/ compiling our samba produces a libtdb.so that has various symbols
in it, (according to nm(1) ), but when we try link against it we get
complaints about those symbols not being defined.

3/ an attempt to switch to using clang to compile everything leads to:


"--aes-accel=intelaesni selected and compiler rejects -Wp,-E,-lang-asm.

One wonders whether there is a clang equivalent of "-Wp,-E,-lang-asm"

The AES acceleration is a configure option for the samba package.

Apparently turning it on requires -Wp,-E,-lang-asm.

which apparently gcc 4.2.1 has, but clang doesn't have.

    FreeBSD clang version 6.0.1 (tags/RELEASE_601/final 335540) (based
    on LLVM 6.0.1)
    Target: x86_64-unknown-freebsd12.0
    Thread model: posix
    InstalledDir: /usr/bin

anyone know if there is a clang equivalent of -Wp, -E,-lang-asm?


In later GCC versions the cpp's -lang-asm seems to be deprecated in 
favor of -x assembler-with-cpp as it conflicts with -l option.


Could you try changing the -Wp,-E,-lang-asm to -Wp,-E,-xassembler-with-cpp?


possible work arrounds include:

1/ Get gcc/lld to produce a library from which lld can find the symbols

2/ find a way to compile this with clang but everything else with gcc?

3/ find a way to allow clang to use
-Wp,-E,-lang-asm

whatever that means


Thoughts from any tools people?

___
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: gcc/clang interoperability problem with a custom "samba" build in recent -current.

2018-07-21 Thread Julian Elischer
I would really like ot get some pointers as to who are our tools 
committers at the moment, in particular who might know about these issues.
The main issue for me at the moment is the ability to compile the 
aesni code in Samba from clang..


Julian


On 20/7/18 7:32 pm, Julian Elischer wrote:
compiling our samba with gcc 4.2.1 in 12 gave us some off behaviour 
when lld became the linker I think..


1/ linking needed some directories added to some of the build 
scripts because previously apparently it looked in $SYSROOT/usr/lib 
by default and now it doesn't.


2/ compiling our samba produces a libtdb.so that has various symbols 
in it, (according to nm(1) ), but when we try link against it we get 
complaints about those symbols not being defined.


3/ an attempt to switch to using clang to compile everything leads to:


"--aes-accel=intelaesni selected and compiler rejects -Wp,-E,-lang-asm.

One wonders whether there is a clang equivalent of "-Wp,-E,-lang-asm"

The AES acceleration is a configure option for the samba package.

Apparently turning it on requires -Wp,-E,-lang-asm.

which apparently gcc 4.2.1 has, but clang doesn't have.

   FreeBSD clang version 6.0.1 (tags/RELEASE_601/final 335540) (based
   on LLVM 6.0.1)
   Target: x86_64-unknown-freebsd12.0
   Thread model: posix
   InstalledDir: /usr/bin

anyone know if there is a clang equivalent of -Wp, -E,-lang-asm?

possible work arrounds include:

1/ Get gcc/lld to produce a library from which lld can find the symbols

2/ find a way to compile this with clang but everything else with gcc?

3/ find a way to allow clang to use
-Wp,-E,-lang-asm

whatever that means


Thoughts from any tools people?

Julian

___
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"




___
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"