You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by waheed <wa...@gmail.com> on 2020/07/17 15:56:49 UTC

qpid C static build failed

The build fails when built with "BUILD_STATIC_LIBS" option on. The branch is
latest master. The default build is successful though.

The error is:

/home/waheed/qpid-proton/c/src/platform/platform.c: In function ‘pn_i_now’:
/home/waheed/qpid-proton/c/src/platform/platform.c:59:19: error: storage
size of ‘now’ isn’t known
   struct timespec now;
                   ^~~
/home/waheed/qpid-proton/c/src/platform/platform.c:60:7: error: implicit
declaration of function ‘clock_gettime’; did you mean ‘localtime’?
[-Wimplicit-function-declaration]
   if (clock_gettime(CLOCK_REALTIME, &now)) pni_fatal("clock_gettime()
failed\n");
       ^~~~~~~~~~~~~
       localtime
/home/waheed/qpid-proton/c/src/platform/platform.c:60:21: error:
‘CLOCK_REALTIME’ undeclared (first use in this function); did you mean
‘_XOPEN_REALTIME’?
   if (clock_gettime(CLOCK_REALTIME, &now)) pni_fatal("clock_gettime()
failed\n");
                     ^~~~~~~~~~~~~~
                     _XOPEN_REALTIME
/home/waheed/qpid-proton/c/src/platform/platform.c:60:21: note: each
undeclared identifier is reported only once for each function it appears in
/home/waheed/qpid-proton/c/src/platform/platform.c:59:19: error: unused
variable ‘now’ [-Werror=unused-variable]
   struct timespec now;
                   ^~~
/home/waheed/qpid-proton/c/src/platform/platform.c: In function
‘pn_i_strerror’:
/home/waheed/qpid-proton/c/src/platform/platform.c:92:3: error: implicit
declaration of function ‘strerror_r’; did you mean ‘strerror’?
[-Wimplicit-function-declaration]
   strerror_r(errnum, buf, buflen);
   ^~~~~~~~~~
   strerror
/home/waheed/qpid-proton/c/src/platform/platform.c: In function ‘pn_i_now’:
/home/waheed/qpid-proton/c/src/platform/platform.c:62:1: error: control
reaches end of non-void function [-Werror=return-type]
 }
 ^
cc1: all warnings being treated as errors
c/CMakeFiles/qpid-proton-static.dir/build.make:766: recipe for target
'c/CMakeFiles/qpid-proton-static.dir/src/platform/platform.c.o' failed
make[2]: *** [c/CMakeFiles/qpid-proton-static.dir/src/platform/platform.c.o]
Error 1
CMakeFiles/Makefile2:1109: recipe for target
'c/CMakeFiles/qpid-proton-static.dir/all' failed
make[1]: *** [c/CMakeFiles/qpid-proton-static.dir/all] Error 2
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2




--
Sent from: http://qpid.2158936.n2.nabble.com/Apache-Qpid-users-f2158936.html

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Re: qpid C static build failed

Posted by Andrew Stitcher <as...@apache.org>.
On Tue, 2020-07-21 at 10:06 -0400, Andrew Stitcher wrote:
> On Fri, 2020-07-17 at 08:56 -0700, waheed wrote:
> > The build fails when built with "BUILD_STATIC_LIBS" option on. The
> > branch is
> > latest master. The default build is successful though.
> 

This should now be fixed on master.

Andrew



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Re: qpid C static build failed

Posted by Andrew Stitcher <as...@apache.org>.
On Fri, 2020-07-17 at 08:56 -0700, waheed wrote:
> The build fails when built with "BUILD_STATIC_LIBS" option on. The
> branch is
> latest master. The default build is successful though.

Well spotted - this is the result of some recent changes I've made as a
result of updating the minimum language requirements - It was
overlooked because I don't use this build much.

I will say that this mailing list is not a good way to let us know
about bugs and problems though - If you find bugs like this in future
please report them using https://issues.apache.org/jira (in the PROTON
project) (preferable) or by creating an issue on github.

Thanks

Andrew



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org