Debian Bug report logs - #686543
netcat.c:1797:16: error: expected ')' before 'DEBIAN_VERSION'

version graph

Package: netcat-traditional; Maintainer for netcat-traditional is Ruben Molina <rmolina@udea.edu.co>; Source for netcat-traditional is src:netcat.

Reported by: Tech <tech@yeeer.net>

Date: Mon, 3 Sep 2012 00:09:01 UTC

Severity: normal

Found in version netcat/1.10-40

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Ruben Molina <rmolina@udea.edu.co>:
Bug#686543; Package netcat-traditional. (Mon, 03 Sep 2012 00:09:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Tech <tech@yeeer.net>:
New Bug report received and forwarded. Copy sent to Ruben Molina <rmolina@udea.edu.co>. (Mon, 03 Sep 2012 00:09:04 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Tech <tech@yeeer.net>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: netcat.c:1797:16: error: expected ')' before 'DEBIAN_VERSION'
Date: Mon, 03 Sep 2012 01:57:18 +0200
Package: netcat-traditional
Version: 1.10-40
Severity: serious
Justification: fails to build from source (but built successfully in the past)

The source package `netcat-traditional' does not build, make dies this way:

  $ make linux
  make -e nc  XFLAGS='-DLINUX' STATIC=-static
  make[1]: Entering directory `/tmp/build/netcat-1.10'
  gcc -O 	  -DLINUX -static -o nc netcat.c 
  netcat.c: In function 'helpme':
  netcat.c:1797:16: error: expected ')' before 'DEBIAN_VERSION'
  make[1]: *** [nc] Error 1
  make[1]: Leaving directory `/tmp/build/netcat-1.10'
  make: *** [linux] Error 2

I am not very familiar with the Debian package build process. In debian/rules
a DFLAGS='... -DDEBIAN_VERSION...' is used, if I try that one, the error ist
the same:

  $ make linux DFLAGS='-DDEBIAN_VERSION="foo"'
  ...
  netcat.c: In function 'helpme':
  netcat.c:1783:3: error: expected ')' before 'foo'
  ...

So maybe DEBIAN_VERSION usually contains some magic to concatenate the strings
with the constant (rather not), or this patch is broken.


Cheers,

	Tech

-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.2.0-3-amd64 (SMP w/4 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=ANSI_X3.4-1968) (ignored: LC_ALL set to C)
Shell: /bin/sh linked to /bin/dash

Versions of packages netcat-traditional depends on:
ii  libc6  2.13-35

netcat-traditional recommends no packages.

netcat-traditional suggests no packages.

-- no debconf information



Information forwarded to debian-bugs-dist@lists.debian.org, Ruben Molina <rmolina@udea.edu.co>:
Bug#686543; Package netcat-traditional. (Sat, 08 Sep 2012 11:27:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jonathan McCrohan <jmccrohan@gmail.com>:
Extra info received and forwarded to list. Copy sent to Ruben Molina <rmolina@udea.edu.co>. (Sat, 08 Sep 2012 11:27:02 GMT) Full text and rfc822 format available.

Message #10 received at 686543@bugs.debian.org (full text, mbox):

From: Jonathan McCrohan <jmccrohan@gmail.com>
To: Tech <tech@yeeer.net>, 686543@bugs.debian.org, control@bugs.debian.org
Subject: Re: Bug#686543: netcat.c:1797:16: error: expected ')' before 'DEBIAN_VERSION'
Date: Sat, 8 Sep 2012 12:25:13 +0100
severity 686543 normal
thanks

Hi Tech,

On 3 September 2012 00:57, Tech <tech@yeeer.net> wrote:
> Severity: serious
> Justification: fails to build from source (but built successfully in the past)

I have been able to build this package successfully using pbuilder
[1], therefore I'm downgrading the severity of this bug to normal.

Please report back if you are able to reproduce the bug using pbuilder.

Thanks,
Jon

(From the Dublin BSP)

[1] https://wiki.ubuntu.com/PbuilderHowto



Severity set to 'normal' from 'serious' Request was from Jonathan McCrohan <jmccrohan@gmail.com> to control@bugs.debian.org. (Sat, 08 Sep 2012 11:27:04 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Ruben Molina <rmolina@udea.edu.co>:
Bug#686543; Package netcat-traditional. (Sat, 08 Sep 2012 11:33:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Maximiliano Curia <maxy@debian.org>:
Extra info received and forwarded to list. Copy sent to Ruben Molina <rmolina@udea.edu.co>. (Sat, 08 Sep 2012 11:33:05 GMT) Full text and rfc822 format available.

Message #17 received at 686543@bugs.debian.org (full text, mbox):

From: Maximiliano Curia <maxy@debian.org>
To: 686543@bugs.debian.org, control@bugs.debian.org
Subject: RE: netcat.c:1797:16: error: expected ')' before 'DEBIAN_VERSION'
Date: Sat, 8 Sep 2012 13:30:50 +0200
fixed 686543 1.10-40
thanks

Hi,

This is not exactly a bug, at least not as reported. Whenever you
define a macro you are defining code that the compiler will check. To
pass a string to the compiler you need to escape the double quotes.
So:

$ make linux DFLAGS='-DDEBIAN_VERSION=\"foo\"'

Should work.

Also, notice that the clean rule removes all patches, leaving the
source base "pristine" (except for the debian/ directory). You can
invoke it using:

$ debian/rules clean

And you can re apply all the patches using (for this particular package):

$ debian/rules patch

Anyway, the expected build process in debian build the program using
the debian/rules Makefile, so the expected commands are:
$ fakeroot debian/rules binary

or

$ dpkg-buildpackage

or

$ debuild

There are actually a lot of options on how you could build the package.

I'm closing this bug, please feel free to reopen with more information
if you are still having problems with this issue.



Marked as fixed in versions netcat/1.10-40. Request was from Maximiliano Curia <maxy@debian.org> to control@bugs.debian.org. (Sat, 08 Sep 2012 11:33:07 GMT) Full text and rfc822 format available.

Message sent on to Tech <tech@yeeer.net>:
Bug#686543. (Sat, 08 Sep 2012 11:39:03 GMT) Full text and rfc822 format available.

Message #22 received at 686543-submitter@bugs.debian.org (full text, mbox):

From: Maximiliano Curia <maxy@debian.org>
To: 686543-submitter@bugs.debian.org
Subject: RE: netcat.c:1797:16: error: expected ')' before 'DEBIAN_VERSION'
Date: Sat, 8 Sep 2012 13:35:46 +0200
fixed 686543 1.10-40
thanks

Hi,

This is not exactly a bug, at least not as reported. Whenever you
define a macro you are defining code that the compiler will check. To
pass a string to the compiler you need to escape the double quotes.
So:

$ make linux DFLAGS='-DDEBIAN_VERSION=\"foo\"'

Should work.

Also, notice that the clean rule removes all patches, leaving the
source base "pristine" (except for the debian/ directory). You can
invoke it using:

$ debian/rules clean

And you can re apply all the patches using (for this particular package):

$ debian/rules patch

Anyway, the expected build process in debian build the program using
the debian/rules Makefile, so the expected commands are:
$ fakeroot debian/rules binary

or

$ dpkg-buildpackage

or

$ debuild

There are actually a lot of options on how you could build the package.

I'm closing this bug, please feel free to reopen with more information
if you are still having problems with this issue.



No longer marked as fixed in versions netcat/1.10-40. Request was from Adam D. Barratt <adam@adam-barratt.org.uk> to control@bugs.debian.org. (Sat, 08 Sep 2012 15:15:03 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Ruben Molina <rmolina@udea.edu.co>:
Bug#686543; Package netcat-traditional. (Sat, 08 Sep 2012 15:54:09 GMT) Full text and rfc822 format available.

Acknowledgement sent to Margarita Manterola <margamanterola@gmail.com>:
Extra info received and forwarded to list. Copy sent to Ruben Molina <rmolina@udea.edu.co>. (Sat, 08 Sep 2012 15:54:09 GMT) Full text and rfc822 format available.

Message #29 received at 686543@bugs.debian.org (full text, mbox):

From: Margarita Manterola <margamanterola@gmail.com>
To: 686543@bugs.debian.org
Subject: It's still a bug
Date: Sat, 8 Sep 2012 16:51:18 +0100
Hi,

This is still a bug, although a normal and not a serious bug.  The
debian package builds correctly, but running "make linux" which should
build, doesn't, because there's a bug in the patch.  Patches to debian
packages shouldn't make otherwise working build environments to stop
building.  The patch should include a sane default to DEBIAN_VERSION
so that "make linux" doesn't fail.

-- 
Besos,
Marga



Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Wed Apr 16 19:06:30 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.