[Bug 209019] net/mosh: Fix build with libc++ 3.8.0

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Sun Apr 24 20:56:58 UTC 2016


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=209019

            Bug ID: 209019
           Summary: net/mosh: Fix build with libc++ 3.8.0
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: Individual Port(s)
          Assignee: zi at FreeBSD.org
          Reporter: dim at FreeBSD.org
             Flags: maintainer-feedback?(zi at FreeBSD.org)
          Assignee: zi at FreeBSD.org

Created attachment 169642
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=169642&action=edit
Fix net/mosh build with libc++ 3.8.0

During the exp-run in bug 208158, it was found that net/mosh gives errors with
libc++ 3.8.0 [1]:

ocb.cc:111:26: error: expected ')'
         static inline uint64_t bswap64(uint64_t x) {
                                ^
/usr/include/sys/endian.h:61:20: note: expanded from macro 'bswap64'
#define bswap64(x)      __bswap64(x)
                        ^
/usr/include/x86/endian.h:80:27: note: expanded from macro '__bswap64'
        (__builtin_constant_p(x) ?      \
                                 ^

I'm not completely sure why this is suddenly a problem when building with a
newer libc++, other than maybe a different include order.  In any case, mosh
tries to redefine its own flavor of bswap64() here, and its configure script
fails to properly detect __builtin_bswap64(), which should really be used.

Therefore, add ac_cv_have_decl___builtin_bswap64=yes (and
ac_cv_have_decl___builtin_ctz=yes) to the configure arguments, and also add
#include "config.h" to ocb.cc, since it didn't include that file yet.

[1]
http://package18.nyi.freebsd.org/data/headamd64PR208158-default/2016-03-22_18h30m05s/logs/errors/mosh-1.2.5.log

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-ports-bugs mailing list