wvstreams fails to build from source in maverick (glibc-2.12)

Bug #602134 reported by Matthias Klose
16
This bug affects 1 person
Affects Status Importance Assigned to Milestone
wvstreams (Ubuntu)
Fix Released
High
Unassigned
Maverick
Fix Released
High
Unassigned

Bug Description

fails to build from source in maverick and in a test rebuild:
https://launchpad.net/ubuntu/+archive/test-rebuild-20100628/+build/1841619

./CXX -c ipstreams/wvunixdgsocket
In file included from ./include/wvunixdgsocket.h:13,
                 from ipstreams/wvunixdgsocket.cc:1:
./include/wvaddr.h: In member function 'uint32_t WvIPAddr::addr() const':
./include/wvaddr.h:284: warning: dereferencing type-punned pointer will break strict-aliasing rules
ipstreams/wvunixdgsocket.cc: In constructor 'WvUnixDGSocket::WvUnixDGSocket(const WvFastString&, bool, int)':
ipstreams/wvunixdgsocket.cc:50: error: 'chmod' was not declared in this scope
make[1]: *** [ipstreams/wvunixdgsocket.o] Error 1
make[1]: Leaving directory `/build/buildd/wvstreams-4.6.1'
make: *** [build-arch-stamp] Error 2
dpkg-buildpackage: error: debian/rules build gave error exit status 2

Related branches

Matthias Klose (doko)
Changed in wvstreams (Ubuntu Maverick):
importance: Undecided → High
milestone: none → maverick-alpha-3
status: New → Confirmed
Revision history for this message
Gursimran singh (simar) wrote :
Changed in wvstreams (Ubuntu Maverick):
status: Confirmed → New
status: New → Confirmed
Revision history for this message
Bhavani Shankar (bhavi) wrote :

hello mohar again!

thanks for coming up with a patch! but this needs more work i believe since you are adding the header again which is already present in the source from your patch:

+--- wvstreams-4.6.1.orig/ipstreams/wvunixdgsocket.cc 2010-07-31 13:46:32.074619367 +0530
++++ wvstreams-4.6.1/ipstreams/wvunixdgsocket.cc 2010-07-31 13:47:40.566613113 +0530
+@@ -1,4 +1,7 @@
+ #include "wvunixdgsocket.h"
++
++// Has to be included for maverick to remove FTBFS
++#include <sys/stat.h>
+ #ifdef MACOS
+ #include <sys/types.h>
+ #include <sys/stat.h>

you observe that already <sys/stat.h> is there in the source perhaps this needs a check for the header as the compiler is unable to locate header file therefore its FTB..

regards

Changed in wvstreams (Ubuntu Maverick):
status: Confirmed → Incomplete
Revision history for this message
Martin Pitt (pitti) wrote :

Bhavani,

The already existing stat.h include only happens if MACOS is defined, which is certainly not the case for a Linux build.

Revision history for this message
Martin Pitt (pitti) wrote :

So I think it'd be easiest to just drop the "#ifdef MACOS". This should be forwarded upstream, and it certainly doesn't hurt to check upstream git/svn/etc. whether it's already fixed there. Thank you!

Changed in wvstreams (Ubuntu Maverick):
status: Incomplete → Triaged
milestone: maverick-alpha-3 → ubuntu-10.10-beta
Revision history for this message
Gursimran singh (simar) wrote :

Thanks again Bhavani for your review. Now I am happy for better patching. I suppose ... :))

As far as MOCOS is concerned I think it is a macro for MAC operating system. MAC OS might need these headers for earlier versions, we did not require these in lucid but in maverick we do. So, to keep the source code still consistent with MAC, I have not touched this code and added a separate line..

or if we want to increase our work we may have something like this

#ifdef MAVERICK
#include <sys/stat.h>
....
..

I think by doing this in MAC also we do not have any multiple inclusions, for obvious reasons. So we can go ahead. But I'm not sure ofcourse that what exactly MACOS means and should we go like this or not..

Revision history for this message
Gursimran singh (simar) wrote :

ping!!

Revision history for this message
Bhavani Shankar (bhavi) wrote :

yes martin,

I ll have a look :)

regards

Revision history for this message
Bhavani Shankar (bhavi) wrote :

hi martin,

done :)

the upstream report

http://code.google.com/p/wvstreams/issues/detail?id=28

regards

Revision history for this message
Bhavani Shankar (bhavi) wrote :
Revision history for this message
Daniel Holbach (dholbach) wrote :

It fails for me on maverick amd64
...

./CXX -c ipstreams/wvunixdgsocket
ipstreams/wvunixdgsocket.cc:4: error: #endif without #if
In file included from ./include/wvunixdgsocket.h:13,
                 from ipstreams/wvunixdgsocket.cc:1:
./include/wvaddr.h: In member function 'uint32_t WvIPAddr::addr() const':
./include/wvaddr.h:284: warning: dereferencing type-punned pointer will break strict-aliasing rules
make[1]: *** [ipstreams/wvunixdgsocket.o] Error 1
make[1]: Leaving directory `/tmp/buildd/wvstreams-4.6.1'
make: *** [build-arch-stamp] Error 2
...

Revision history for this message
Bhavani Shankar (bhavi) wrote :

hmm daniel okay

it has happened due to spurious #endif in the code i think

on it now :)

regards

Changed in wvstreams (Ubuntu Maverick):
status: Triaged → In Progress
assignee: nobody → Bhavani Shankar (bhavi)
Revision history for this message
Bhavani Shankar (bhavi) wrote :

this required bit more work than I thought initially

here is the updated patch

regards

Changed in wvstreams (Ubuntu Maverick):
status: In Progress → Confirmed
assignee: Bhavani Shankar (bhavi) → nobody
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package wvstreams - 4.6.1-1ubuntu1

---------------
wvstreams (4.6.1-1ubuntu1) maverick; urgency=low

  * ipstreams/wvunixdgsocket.cc, streams/wvatomicfile.cc:
    + remove defenition of MACOS and spurious #endif to fix chmod not
      found gcc error and hence build problems (LP: #602134)
    (forwarded upstream as
    http://code.google.com/p/wvstreams/issues/detail?id=28)
 -- Bhavani Shankar <email address hidden> Thu, 12 Aug 2010 16:08:57 +0530

Changed in wvstreams (Ubuntu Maverick):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.