[Samba] Can't build 3.0.4 under QNX 6.1.0

Mackenzie Alan-G25604 G25604 at motorola.com
Thu Jul 22 09:01:31 GMT 2004



-----Original Message-----
From: Andrew Bartlett [mailto:abartlet at samba.org]
Sent: 17 July 2004 00:41
To: Mackenzie Alan-G25604
Cc: samba at lists.samba.org
Subject: Re: [Samba] Can't build 3.0.4 under QNX 6.1.0


>On Sat, 2004-07-17 at 01:01, Mackenzie Alan-G25604 wrote:
>> I've been trying to build Samba 3.0.4 on QNX 6.1.0.

[ .... ]
 
>> 5. # make 2> make-stderr.txt | tee make-stdout.txt
>> This produced this error message:
>> gawk: script/mkproto.awk:14: fatal: cannot open file 
>> `cnrpc_client/cli_lsarpc.cnrpc_client/cli_samr.cnrpc_client/cli_netlogon.cnrpc_client/...
>>   [middle of very long error message line snipped]
>>..../srv_spoolss_nt.cnrpc_server/srv_echo.cnrpc_server/srv_echo_nt.cnsam/idmap.cnsam/idmap_util.cnsam/idmap_tdb.cnlibsmb/spnego.cnlibsmb/passchange.c' for reading (Filename too long)

> Sounds like something isn't quite standard with QNX (causing the
> concatenation).  You could, as a workaround, run 'make proto' on a linux
> box, and ship the proto.h across.

> If you figure out why it's happening, then please file a bug (with patch
> if possible)

The problem is in ..../source/script/mkproto.sh within the line:

proto_src="`echo $@ | tr ' ' '\n' | sed -e 's/\.o/\.c/g' | sort | uniq | egrep -v 'ubiqx/|wrapped|modules/getdate'`"
                      ^^^^^^^^^^^

In the tr call, QNX's shell is substituting space with literal 'n' rather
than carriage returns.  So, rather than being divided up into single
lines with one file.c on each line, they're all crammed together onto a
single line, separated uselessly by 'n's.  :-(.  I'm not a shell expert,
but NOTHING I tried could persuade QNX's shell to interpret '\n' as
carriage return.  Trying a sed in place of the tr didn't help either.

As a workaround, I put in an AWK script instead.  (OK, this is overkill,
but it seemed to work.)  In fact, I took out the sed command too, so it
didn't look _too_ abtuse.  Here is what "seemed to work" for me:

proto_src="`echo $@ | gawk '{for (i = 1 ; i <= NF ; i += 1) {gsub (/\.o/, ".c", $i); print $i}}' | sort | uniq |  
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
rep -v 'ubiqx/|wrapped|modules/getdate'`"

(Apologies for any line-break problems in the above.  I'm using MS
Outlook.  :-()

When I say "seemed to work", I mean that the build hung up later on on
something else.  :-(  I'll get there!

Andrew Bartlett

-- 
Alan Mackenzie (Motorola, Munich)


More information about the samba mailing list