Bug#673579: cbmc: FTBFS[kfreebsd,hurd]: GCC-4.7

2012-05-21 Thread Robert Millan
2012/5/20 Christoph Egger christ...@debian.org:
 __GLIBC__ should cover all of them alone. Or alternatively consistently
 checking for kernels:

 #if defined(__linux__) || defined(__GNU__) || defined(__FreeBSD_kernel__)

Please keep in mind __FreeBSD_kernel__ doesn't imply anything about
userland.  In fact this macro is defined in recent versions of
FreeBSD.

-- 
Robert Millan



-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#673579: cbmc: FTBFS[kfreebsd,hurd]: GCC-4.7

2012-05-20 Thread Salvatore Bonaccorso
tags 673579 + pending
thanks

Hi

(I added Michael Taautschnig directly to the loop)

On Sat, May 19, 2012 at 11:25:41PM +0100, Steven Chamberlain wrote:
 tags 673579 + patch
 thanks
 
 On 19/05/12 23:02, Christoph Egger wrote:
  Steven Chamberlain ste...@pyro.eu.org writes:
  #if defined(__linux__) || defined(__GNU__) || defined(__GLIBC__)
  
  __GLIBC__ should cover all of them alone. Or alternatively consistently
  checking for kernels [...]
 
 Oh I see, thanks.  I think it is the userland we are interested in here
 so __GLIBC__ sounds right.
 
 Please find a patch attached (to apply after KiBi's) which I have tested
 on kfreebsd-i386.
 
 I've no idea if __GLIBC__ exists on __APPLE__ or other non-Debian
 platforms but I guess we don't need to worry about them, so I've left
 that alone.

Steven, many thanks for pointing to this.

Michael, I did the NMU some days ago, trying to help on some RC bugs
for wheezy. I will upload the package with the fix again, with
DELAYED/2 only. 

Please let me know if I should cancel, and if you would like to do the
upload.

Regards, and sorry for the noise
Salvatore
diff -Nru cbmc-4.1/debian/changelog cbmc-4.1/debian/changelog
--- cbmc-4.1/debian/changelog	2012-05-13 14:25:55.0 +0200
+++ cbmc-4.1/debian/changelog	2012-05-20 07:56:05.0 +0200
@@ -1,3 +1,13 @@
+cbmc (4.1-1.2) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Update fix-FTBFS-with-gcc-4.7.patch patch.
+Fix FTBFS with gcc 4.7 on kfreebsd and hurd.
+Thanks to Steven Chamberlain ste...@pyro.eu.org for the patch.
+(Closes: #673579)
+
+ -- Salvatore Bonaccorso car...@debian.org  Sun, 20 May 2012 07:55:28 +0200
+
 cbmc (4.1-1.1) unstable; urgency=low
 
   * Non-maintainer upload.
diff -Nru cbmc-4.1/debian/patches/fix-FTBFS-with-gcc-4.7.patch cbmc-4.1/debian/patches/fix-FTBFS-with-gcc-4.7.patch
--- cbmc-4.1/debian/patches/fix-FTBFS-with-gcc-4.7.patch	2012-05-13 14:25:55.0 +0200
+++ cbmc-4.1/debian/patches/fix-FTBFS-with-gcc-4.7.patch	2012-05-20 07:56:05.0 +0200
@@ -4,7 +4,7 @@
 Bug-Debian: http://bugs.debian.org/667131
 Forwarded: no
 Author: Cyril Brulebois k...@debian.org
-Last-Update: 2012-05-13
+Last-Update: 2012-05-20
 
 --- a/src/ansi-c/c_preprocess.cpp
 +++ b/src/ansi-c/c_preprocess.cpp
@@ -13,7 +13,7 @@
  #include string.h
  
 -#ifdef __LINUX__
-+#ifdef __linux__
++#ifdef __GLIBC__
  #include unistd.h
  #endif
  


signature.asc
Description: Digital signature


Bug#673579: cbmc: FTBFS[kfreebsd,hurd]: GCC-4.7

2012-05-19 Thread Steven Chamberlain
Package: src:cbmc
Version: 4.1-1.1
Severity: serious
Tags: sid wheezy
User: debian-...@lists.debian.org
Usertags: kfreebsd
User: debian-...@lists.debian.org
Usertags: ftbfs-gcc-4.7
X-Debbugs-Cc: debian-...@lists.debian.org
Justification: fails to build from source (but built successfully in the
past)

Hi,

Related to #667131, there is some remaining code that FTBFS
on kfreebsd-* and hurd-i386 with gcc-4.7:

 g++ -c -MMD -DSTL_HASH_TR1 -g -O2 -fstack-protector --param=ssp-buffer-size=4 
 -Wformat -Werror=format-security -I .. -I ../util -o c_preprocess.o 
 c_preprocess.cpp
 c_preprocess.cpp: In function 'bool c_preprocess(std::istream, 
 std::ostream, message_handlert)':
 c_preprocess.cpp:189:22: error: 'unlink' was not declared in this scope
 c_preprocess.cpp: In function 'bool c_preprocess_visual_studio(const string, 
 std::ostream, message_handlert)':
 c_preprocess.cpp:342:24: error: 'unlink' was not declared in this scope
 c_preprocess.cpp:355:22: error: 'unlink' was not declared in this scope
 c_preprocess.cpp: In function 'bool c_preprocess_codewarrior(const string, 
 std::ostream, message_handlert)':
 c_preprocess.cpp:497:24: error: 'unlink' was not declared in this scope
 c_preprocess.cpp:501:24: error: 'unlink' was not declared in this scope
 c_preprocess.cpp:515:29: error: 'unlink' was not declared in this scope
 c_preprocess.cpp: In function 'bool c_preprocess_gcc(const string, 
 std::ostream, message_handlert)':
 c_preprocess.cpp:784:31: error: 'unlink' was not declared in this scope
 c_preprocess.cpp:798:29: error: 'unlink' was not declared in this scope
 c_preprocess.cpp: In function 'bool c_preprocess_arm(const string, 
 std::ostream, message_handlert)':
 c_preprocess.cpp:934:31: error: 'unlink' was not declared in this scope
 c_preprocess.cpp:948:29: error: 'unlink' was not declared in this scope
 make[3]: *** [c_preprocess.o] Error 1
 make[3]: Leaving directory 
 `/build/buildd-cbmc_4.1-1.1-kfreebsd-i386-gdeKmI/cbmc-4.1/src/ansi-c'
 make[2]: *** [ansi-c.dir] Error 2

Thanks,
Regards,
-- 
Steven Chamberlain
ste...@pyro.eu.org



-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#673579: cbmc: FTBFS[kfreebsd,hurd]: GCC-4.7

2012-05-19 Thread Salvatore Bonaccorso
Hi

On Sat, May 19, 2012 at 10:19:16PM +0100, Steven Chamberlain wrote:
 Package: src:cbmc
 Version: 4.1-1.1
 Severity: serious
 Tags: sid wheezy
 User: debian-...@lists.debian.org
 Usertags: kfreebsd
 User: debian-...@lists.debian.org
 Usertags: ftbfs-gcc-4.7
 X-Debbugs-Cc: debian-...@lists.debian.org
 Justification: fails to build from source (but built successfully in the
 past)
 
 Hi,
 
 Related to #667131, there is some remaining code that FTBFS
 on kfreebsd-* and hurd-i386 with gcc-4.7:

Hmm, I did the NMU for #667131. I can have a look at the new FTBFS.

Regards,
Salvatore


signature.asc
Description: Digital signature


Bug#673579: cbmc: FTBFS[kfreebsd,hurd]: GCC-4.7

2012-05-19 Thread Steven Chamberlain
Hi Salvatore,

In src/ansi-c/c_preprocess.cpp, the #include unistd.h changed by
KiBi's patch is still wrapped in #ifdef __linux__.

I would think:

#if defined(__linux__) || defined(__GNU__) || defined(__GLIBC__)

is the best way to cover Linux/kFreeBSD/Hurd.

Regards,
-- 
Steven Chamberlain
ste...@pyro.eu.org



-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#673579: cbmc: FTBFS[kfreebsd,hurd]: GCC-4.7

2012-05-19 Thread Christoph Egger
Hi!

Steven Chamberlain ste...@pyro.eu.org writes:
 #if defined(__linux__) || defined(__GNU__) || defined(__GLIBC__)

__GLIBC__ should cover all of them alone. Or alternatively consistently
checking for kernels:

#if defined(__linux__) || defined(__GNU__) || defined(__FreeBSD_kernel__)

Regards

Christoph

-- 
9FED 5C6C E206 B70A 5857  70CA 9655 22B9 D49A E731
Debian Developer | Lisp Hacker | CaCert Assurer



-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#673579: cbmc: FTBFS[kfreebsd,hurd]: GCC-4.7

2012-05-19 Thread Steven Chamberlain
tags 673579 + patch
thanks

On 19/05/12 23:02, Christoph Egger wrote:
 Steven Chamberlain ste...@pyro.eu.org writes:
 #if defined(__linux__) || defined(__GNU__) || defined(__GLIBC__)
 
 __GLIBC__ should cover all of them alone. Or alternatively consistently
 checking for kernels [...]

Oh I see, thanks.  I think it is the userland we are interested in here
so __GLIBC__ sounds right.

Please find a patch attached (to apply after KiBi's) which I have tested
on kfreebsd-i386.

I've no idea if __GLIBC__ exists on __APPLE__ or other non-Debian
platforms but I guess we don't need to worry about them, so I've left
that alone.

Regards,
-- 
Steven Chamberlain
ste...@pyro.eu.org
Index: cbmc-4.1/src/ansi-c/c_preprocess.cpp
===
--- cbmc-4.1.orig/src/ansi-c/c_preprocess.cpp	2012-05-19 22:39:07.0 +0100
+++ cbmc-4.1/src/ansi-c/c_preprocess.cpp	2012-05-19 23:13:15.323640626 +0100
@@ -10,7 +10,7 @@
 #include stdlib.h
 #include string.h
 
-#ifdef __linux__
+#ifdef __GLIBC__
 #include unistd.h
 #endif