Re: [bug #49093] ifdef checks for non-empty value, not definition

2016-09-14 Thread Paul Smith
On Wed, 2016-09-14 at 15:16 -0700, Philip Guenther wrote:
> On Wed, Sep 14, 2016 at 3:13 PM, Paul D. Smith  
> wrote:
> ...
> > Probably an example like this would help make the doc more clear.
> 
> There *is* an example like that in the doc in at least version 4.2.1!

Oh.  Yeah.  Hah!

___
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make


[bug #49093] ifdef checks for non-empty value, not definition

2016-09-14 Thread Paul D. Smith
Update of bug #49093 (project make):

  Status:None => Works for me   
 Open/Closed:Open => Closed 

___

Follow-up Comment #2:

Heh.  Philip Guenther points out such an example already exists in the manual.
 I'm closing this bug.

___

Reply to this item at:

  

___
  Message sent via/by Savannah
  http://savannah.gnu.org/


___
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make


Re: [bug #49093] ifdef checks for non-empty value, not definition

2016-09-14 Thread Philip Guenther
On Wed, Sep 14, 2016 at 3:13 PM, Paul D. Smith  wrote:
...
> Probably an example like this would help make the doc more clear.

There *is* an example like that in the doc in at least version 4.2.1!

 Note that `ifdef' only tests whether a variable has a value.  It
 does not expand the variable to see if that value is nonempty.
 Consequently, tests using `ifdef' return true for all definitions
 except those like `foo ='.  To test for an empty value, use
 `ifeq ($(foo),)'.  For example,

  bar =
  foo = $(bar)
  ifdef foo
  frobozz = yes
  else
  frobozz = no
  endif

 sets `frobozz' to `yes', while:

  foo =
  ifdef foo
  frobozz = yes
  else
  frobozz = no
  endif

 sets `frobozz' to `no'.

___
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make


[bug #49093] ifdef checks for non-empty value, not definition

2016-09-14 Thread Paul D. Smith
Update of bug #49093 (project make):

  Item Group: Bug => Documentation  
   Triage Status:None => Small Effort   

___

Follow-up Comment #1:

What the doc is trying to say is that:


FOO =
ifdef FOO
$(info true)
endif


will not print true because FOO has no value.

However, this:


FOO =
BAR = $(FOO)
ifdef BAR
$(info true)
endif


_will_ print true.  Even though if you expanded $(BAR) you'd get the empty
string, the variable BAR is not empty (it's set to $(FOO)) and so ifdef calls
it defined.  Probably an example like this would help make the doc more
clear.

Yes, it's true that ifdef is badly named.  It should be something like "ifset"
or whatever instead.  However, it works as intended and so does the origin
function value "undefined"; they have had these inconsistent meanings for 20+
years now; they're not going to change.

___

Reply to this item at:

  

___
  Message sent via/by Savannah
  http://savannah.gnu.org/


___
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make


[bug #49093] ifdef checks for non-empty value, not definition

2016-09-14 Thread Danek Duvall
URL:
  

 Summary: ifdef checks for non-empty value, not definition
 Project: make
Submitted by: dduvall
Submitted on: Wed 14 Sep 2016 09:57:06 PM GMT
Severity: 3 - Normal
  Item Group: Bug
  Status: None
 Privacy: Public
 Assigned to: None
 Open/Closed: Open
 Discussion Lock: Any
   Component Version: 4.2.1
Operating System: POSIX-Based
   Fixed Release: None
   Triage Status: None

___

Details:

The info doc for "ifdef" is inconsistent.  It first says

If the value of that variable has a non-empty value, the
TEXT-IF-TRUE is effective

but then later says

Note that 'ifdef' only tests whether a variable has a value.
It does not expand the variable to see if that value is
nonempty.

Perhaps I'm reading one of those two bits wrong?

At any rate, there seems to be a discrepancy in behavior between "ifdef" and
$(origin).  Again, perhaps there's something I'm missing, but the following
makefile demonstrates the issue.  If I leave VAR set to empty, then ifdef
thinks VAR is undefined, but origin thinks it's defined.  If I set VAR to a
non-empty value, both think it's defined.  If I remove the line entirely or
add "undefine VAR", then both think it's undefined.  I see this behavior with
4.2.1 and with 3.82.

VAR=

ifdef VAR
$(info ifdef thinks VAR is defined)
else
$(info ifdef thinks VAR is undefined)
endif

ifneq "$(origin VAR)" "undefined"
$(info ifneq/origin thinks VAR is defined)
else
$(info ifneq/origin thinks VAR is undefined)
endif

all:




___

Reply to this item at:

  

___
  Message sent via/by Savannah
  http://savannah.gnu.org/


___
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make


[bug #49014] Zombies in parallel builds with pselect code

2016-09-14 Thread Jörg Sonnenberger
Follow-up Comment #7, bug #49014 (project make):

It's a red herring. FreeBSD has been providing a system call since at least
version 8.1 and 9.0. A correct userland implementation can be done on top of
other primitives like ppoll or kqueue, but that's not relevant here.

The common element for all the reports so far is that the file descriptor for
the jobs pipe got closed and something else is reusing the FD. This is much
more noticable when disabling the pselect use it seems.

___

Reply to this item at:

  

___
  Message sent via/by Savannah
  http://savannah.gnu.org/


___
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make


[bug #49014] Zombies in parallel builds with pselect code

2016-09-14 Thread Paul D. Smith
Follow-up Comment #6, bug #49014 (project make):

It can't be implemented in userland.  What pselect() does is unblock the
signal, call select, then have the signal blocked again on return.  The point
of using pselect() is that the signal unblock/block must be atomic with the
select() system call.  Otherwise between the instant you unblock the signal
and invoke select(), the signal could arrive and you miss it.  Ditto for after
select() returns and before the signal is blocked again.  There's no way to
avoid that from userland.  The Linux man page for pselect has a good
explanation, as does this LWN article: https://lwn.net/Articles/176911/

I looked at the NetBSD man page but it didn't say clearly one way or the other
whether it used a system call or not.  If you've checked and verified it uses
a system call that's good.

I have to say I still don't see what the bug could be.  Stripping out all the
ifdefs etc. the handling of SIGCHLD is very simple when HAVE_PSELECT is set so
it's hard to know what might be wrong.  I think we may have to involve the
NetBSD devs to talk about how pselect() works there.

___

Reply to this item at:

  

___
  Message sent via/by Savannah
  http://savannah.gnu.org/


___
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make


Re: Bug make

2016-09-14 Thread Paul Smith
On Tue, 2016-09-13 at 23:24 +0200, orsobianco9 wrote:
> the make program reports the following error.
> 'This program was compiled for i686-pc-linux-gnu
> Report bugs to  '

In general it's better to run your test case that you want to send to
the mailing list with LANG=C as most GNU make developers use English as
their primary language.

In any event:

> ~/java$ make -jpkg jdk-8u102-linux-i586-tar.gz

This is not a valid command line for GNU make.

The -j option for GNU make takes either no argument, or else a numeric
argument (number of parallel jobs to run).  Here you've given it an
argument of "pkg" (-jpkg) which is illegal, and so you're getting an
error.

You can see that from the error message that's printed.

___
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make


Bug make

2016-09-14 Thread orsobianco9

the make program reports the following error.
'This program was compiled for i686-pc-linux-gnu
Report bugs to  '

Regards

Gian Paolo Marcolongo

System Ubuntu 16.04LTS 32bit

paolo@paolo-300E4C-300E5C-300E7C:~$ cd java
paolo@paolo-300E4C-300E5C-300E7C:~/java$ dir
jdk-8u102-linux-i586.tar.gz
paolo@paolo-300E4C-300E5C-300E7C:~/java$ make -jpkg jdk-8u102-linux-i586-tar.gz
make: l'opzione "-j" richiede un argomento intero positivo
Uso: make [opzioni] [obiettivo] ...
Opzioni:
  -b, -m  Ignorato per compatibilità
  -B, --always-make   Genera tutti gli obiettivi incondizionatamente
  -C DIRECTORY, --directory=DIRECTORY
  Cambia DIRECTORY prima di fare qualunque cosa.
  -d  Mostra molte informazioni di debug.
  --debug[=FLAGS] Mostra diversi tipi di informazioni di debug.
  -e, --environment-overrides
  Le variabili ambiente sovrascrivono i makefile.
  --eval=TESTO   Analizza STRINGA come estratta dal makefile.
  -f FILE, --file=FILE, --makefile=FILE
  Legge FILE come un makefile.
  -h, --help  Mostra questo messaggio ed esce.
  -i, --ignore-errors Ignora gli errori dai set di istruzioni.
  -I DIRECTORY, --include-dir=DIRECTORY
  Cerca nella DIRECTORY per i makefile inclusi.
  -j [N], --jobs[=N]  Permette N processi alla volta; infiniti se non 
viene specificato l'argomento.
  -k, --keep-goingContinua l'esecuzione quando non è possibile 
creare alcuni obiettivi.
  -l [N], --load-average[=N], --max-load[=N]
  Non avvia processi multipli a meno che il carico 
di lavoro non sia sotto N.
  -L, --check-symlink-times   Usa il più recente mtime tra i collegamenti 
simbolici e l'obiettivo.
  -n, --just-print, --dry-run, --recon
  Non esegue alcun set di istruzioni; lo stampa 
solamente.
  -o FILE, --old-file=FILE, --assume-old=FILE
  Considera il FILE come molto vecchio e non 
riesegue make.
  -O[TIPO], --output-sync[=TIPO]
  Sincronizza l'output dei processi paralleli dal 
TIPO.
  -p, --print-data-base   Stampa il database interno di make.
  -q, --question  Non avvia alcun set di istruzioni; lo stato di 
uscita indica se è aggiornato.
  -r, --no-builtin-rules  Disabilita le regole implicite interne.
  -R, --no-builtin-variables  Disabilita le impostazioni delle variabili 
interne.
  -s, --silent, --quiet   Non visualizza i set di istruzioni.
  -S, --no-keep-going, --stop
Disattiva l'opzione -k.
  -t, --touch Esegue il touch degli obiettivi invece di 
ricrearli.
  --trace Stampa informazioni di tracciamento.
  -v, --version   Stampa il numero di versione di make ed esce.
  -w, --print-directory   Stampa la directory corrente.
  --no-print-directoryDisattiva l'opzione -w anche se era stata 
attivata implicitamente.
  -W FILE, --what-if=FILE, --new-file=FILE, --assume-new=FILE
  Considera FILE come nuovo di zecca.
  --warn-undefined-variables  Avvisa quando viene referenziata una variabile 
non definita.

Questo programma è stato compilato per i686-pc-linux-gnu
Segnalare i bug a 
paolo@paolo-300E4C-300E5C-300E7C:~/java$ dir
jre-8u102-linux-i586.tar.gz
paolo@paolo-300E4C-300E5C-300E7C:~/java$ make -jpkg jre-8u102-linux-i586.tar.gz
make: l'opzione "-j" richiede un argomento intero positivo
Uso: make [opzioni] [obiettivo] ...
Opzioni:
  -b, -m  Ignorato per compatibilità
  -B, --always-make   Genera tutti gli obiettivi incondizionatamente
  -C DIRECTORY, --directory=DIRECTORY
  Cambia DIRECTORY prima di fare qualunque cosa.
  -d  Mostra molte informazioni di debug.
  --debug[=FLAGS] Mostra diversi tipi di informazioni di debug.
  -e, --environment-overrides
  Le variabili ambiente sovrascrivono i makefile.
  --eval=TESTO   Analizza STRINGA come estratta dal makefile.
  -f FILE, --file=FILE, --makefile=FILE
  Legge FILE come un makefile.
  -h, --help  Mostra questo messaggio ed esce.
  -i, --ignore-errors Ignora gli errori dai set di istruzioni.
  -I DIRECTORY, --include-dir=DIRECTORY
  Cerca nella DIRECTORY per i makefile inclusi.
  -j [N], --jobs[=N]  Permette N processi alla volta; infiniti se non 
viene specificato l'argomento.
  -k, --keep-goingContinua l'esecuzione quando non è possibile 
creare alcuni obiettivi.
  -l [N], --load-average[=N], --max-load[=N]
  Non avvia processi multipli a meno che il carico 
di lavoro non sia sotto N.
  -L, --check-symlink-times   Usa il più recente mtime