Menu

#1501 Cannot build 1.08.2BETA (GCC 9.2)

Next release
closed
nobody
None
Medium
2019-12-04
2019-12-03
No

Trying to build PWSafe, I get this, now:

$ make
[  0%] Generating core_st.cpp, core_st.h
Scanning dependencies of target core
[  1%] Building CXX object src/core/CMakeFiles/core.dir/AES.cpp.o
In file included from /home/<home>/local/src/pwsafe/src/os/typedefs.h:164,
                 from /home/<home>/local/src/pwsafe/src/core/AES.h:16,
                 from /home/<home>/local/src/pwsafe/src/core/AES.cpp:13:
/home/<home>/local/src/pwsafe/src/os/unix/pws_time.h:21:32: error: ‘__time64_t’ does not name a type; did you mean ‘__timer_t’?
   21 | extern int localtime64_r(const __time64_t *timep, struct tm *result);
      |                                ^~~~~~~~~~
      |                                __timer_t
make[2]: *** [src/core/CMakeFiles/core.dir/build.make:72: src/core/CMakeFiles/core.dir/AES.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:365: src/core/CMakeFiles/core.dir/all] Error 2
make: *** [Makefile:163: all] Error 2

I built this version of PWsafe with a previous distribution version, but now some libraries are updated and that build crashes on start, now. I'm happy to help, just tell me how. I don't understand this error.

Discussion

  • Porcelain Mouse

    Porcelain Mouse - 2019-12-03

    Well, I think I found a way to fix it, but I don't know if it is correct.

    $ git diff
    diff --git a/src/os/unix/pws_time.h b/src/os/unix/pws_time.h
    index 683cb48b9..2092dd3dc 100644
    --- a/src/os/unix/pws_time.h
    +++ b/src/os/unix/pws_time.h
    @@ -14,7 +14,7 @@
     #include <time.h>
     #endif
    
    -#if !defined(__time64_t) && !defined(__TIME64_T_TYPE)
    +#if !defined(__time64_t) || !defined(__TIME64_T_TYPE)
     typedef uint64_t __time64_t;
     #endif
    

    This patch allows the build to complete and the result seems to work. So, I think the logic is wrong, at least for my Linux system, which must have TIME64_T_TYPE defined.

     
  • Porcelain Mouse

    Porcelain Mouse - 2019-12-03

    Need me to submit a pull request?

     
  • Rony Shapiro

    Rony Shapiro - 2019-12-03

    Sorry for the late response - this issue was fixed in commit 412458d28 about a month ago. You should be able to pull the current master and build successfully.

     
  • Rony Shapiro

    Rony Shapiro - 2019-12-03
    • status: open --> closed
     
  • Rony Shapiro

    Rony Shapiro - 2019-12-03

    Closing - if the build against master fails please re-open.

     
  • Porcelain Mouse

    Porcelain Mouse - 2019-12-04

    Oh, hey, sorry. I just figured that the Linux code was tied to the BETA tags. I thought I was not supposed to use master for Linux builds. Hmm, wonder where I got that impression. I think a while ago only the BETA tags would compile on my system. Or maybe it was the linux release packages that were always related to these tags. Well, whatever, I'll try HEAD now. Cool. Thanks!

     

Log in to post a comment.