Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v4.9.0 compile failure on Debian unstable #638

Closed
cricalix opened this issue Aug 23, 2018 · 11 comments
Closed

v4.9.0 compile failure on Debian unstable #638

cricalix opened this issue Aug 23, 2018 · 11 comments

Comments

@cricalix
Copy link

On buster/sid, updated today, watchman v4.9.0 will not compile.

CXX scm/watchman-Mercurial.o
scm/Mercurial.cpp: In constructor ‘watchman::Mercurial::infoCache::infoCache(std::__cxx11::string)’:
scm/Mercurial.cpp:16:40: error: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘struct watchman::FileInformation’; use assignment or value-initialization instead [-Werror=class-memaccess]

   memset(&dirstate, 0, sizeof(dirstate));
                                        ^
In file included from scm/Mercurial.h:10,
                 from scm/Mercurial.cpp:3:
./FileInformation.h:18:8: note: ‘struct watchman::FileInformation’ declared here
 struct FileInformation {
        ^~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
make[1]: *** [Makefile:4446: scm/watchman-Mercurial.o] Error 1
make[1]: Leaving directory '/home/user/src/watchman'
make: *** [Makefile:1264: all] Error 2

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/8/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 8.2.0-4' --with-bugurl=file:///usr/share/doc/gcc-8/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++ --prefix=/usr --with-gcc-major-version-only --program-suffix=-8 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 8.2.0 (Debian 8.2.0-4)

Your build configuration:

  CC = gcc
  CPPFLAGS =  -D_REENTRANT -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
  CFLAGS = -g -O2 -Wall -Wextra -Wdeclaration-after-statement -g -gdwarf-2 -fno-omit-frame-pointer
  CXX = g++
  CXXFLAGS = -g -O2 -Wall -Wextra -g -gdwarf-2 -fno-omit-frame-pointer
  LDFLAGS = 
  prefix: /usr/local
  version: 4.9.0
  state directory: /usr/local/var/run/watchman
@cricalix
Copy link
Author

Issue goes away when I switch to master, and different problems show up in thirdparty/jansson.

thirdparty/jansson/load.cpp:109:26: error: ‘ near '’ directive output may be truncated writing 7 bytes into a region of size between 1 and 160 [-Werror=format-truncation=]
"%s near '%s'", msg_text, saved_text);
^~~~~~~~~~~~~~
thirdparty/jansson/load.cpp:108:25: note: ‘snprintf’ output 9 or more bytes (assuming 168) into a destination of size 160

@wez
Copy link
Contributor

wez commented Aug 23, 2018

You can pass --enable-lenient to configure to disable promoting warnings to errors; hopefully that will unblock you.

@cricalix
Copy link
Author

Yep, that unblocked. Thank you wez. (Hasn't got the diff view working, but it's squashed Nuclide's "I can't find watchman" on startup.)

@chadfurman
Copy link

I have similar issues related to jansson -- this appears to be a new GCC thing akheron/jansson#423

@RtillaWork
Copy link

RtillaWork commented Oct 25, 2018

Thank you @wez
Had exactly the same error. --enable-lenient made it pass.

@meowsus
Copy link

meowsus commented Jun 27, 2019

On Ubuntu 19.04 the only thing that worked for me was checking out the v4.9.0 tag and compiling with:

./configure --without-python  --without-pcre --enable-lenient

Hope this helps someone in the future.

OskarPersson added a commit to ESSolutions/ESSArch that referenced this issue Jul 13, 2019
OskarPersson added a commit to ESSolutions/ESSArch that referenced this issue Jul 15, 2019
@rohanshukla94
Copy link

./configure --enable-lenient did the job. I had to install python-dev though.

@marianzburlea
Copy link

You can pass --enable-lenient to configure to disable promoting warnings to errors; hopefully that will unblock you.

Thanks a lot! This helped me pass the make step on Ubuntu 19.04

@wez wez closed this as completed Nov 1, 2019
facebook-github-bot pushed a commit that referenced this issue Nov 2, 2019
Summary:
Bumps [ffi](https://github.com/ffi/ffi) from 1.9.18 to 1.11.1.
<details>
<summary>Changelog</summary>

*Sourced from [ffi's changelog](https://github.com/ffi/ffi/blob/master/CHANGELOG.md).*

> 1.11.1 / 2019-05-20
> -------------------
>
> Changed:
> * Raise required ruby version to >=2.0. [#699, [#700
> * Fix a possible linker error on ruby < 2.3 on Linux.
>
>
> 1.11.0 / 2019-05-17
> -------------------
> This version was yanked on 2019-05-20 to fix an install issue on ruby-1.9.3. [#700
>
> Added:
> * Add ability to disable or force use of system libffi. [#669
>   Use like `gem inst ffi -- --enable-system-libffi` .
> * Add ability to call FFI callbacks from outside of FFI call frame. [#584
> * Add proper documentation to FFI::Generator and ::Task
> * Add gemspec metadata. [#696, [#698
>
> Changed:
> * Fix stdcall on Win32. [#649, [#669
> * Fix load paths for FFI::Generator::Task
> * Fix FFI::Pointer#read_string(0) to return a binary String. [#692
> * Fix benchmark suite so that it runs on ruby-2.x
> * Move FFI::Platform::CPU from C to Ruby. [#663
> * Move FFI::StructByReference to Ruby. [#681
> * Move FFI::DataConverter to Ruby ([#661)
> * Various cleanups and improvements of specs and benchmarks
>
> Removed:
> * Remove ruby-1.8 and 1.9 compatibility code. [#683
> * Remove unused spec files. [#684
>
>
> 1.10.0 / 2019-01-06
> -------------------
>
> Added:
> * Add /opt/local/lib/ to ffi's fallback library search path. [#638
> * Add binary gem support for ruby-2.6 on Windows
> * Add FreeBSD on AArch64 and ARM support. [#644
> * Add FFI::LastError.winapi_error on Windows native or Cygwin. [#633
>
> Changed:
> * Update to rake-compiler-dock-0.7.0
> * Use 64-bit inodes on FreeBSD >= 12. [#644
> * Switch time_t and suseconds_t types to long on FreeBSD. [#627
> * Make register_t long_long on 64-bit FreeBSD. [#644
> * Fix Pointer#write_array_of_type [#637
>
></tr></table> ... (truncated)
</details>
<details>
<summary>Commits</summary>

- [`3d8c91c`](ffi/ffi@3d8c91c) Update CHANGELOG for ffi-1.11.1
- [`2a3d9d6`](ffi/ffi@2a3d9d6) Bump VERSION to 1.11.1
- [`19d5776`](ffi/ffi@19d5776) Add some missing items to CHANGELOG for ffi-1.11.0
- [`08b9b78`](ffi/ffi@08b9b78) Raise ruby version requirement to >=2.0
- [`e76c43b`](ffi/ffi@e76c43b) Fix build on ruby-2.0 on Linux
- [`9b4a9e4`](ffi/ffi@9b4a9e4) Add version 1.11.0 to CHANGELOG
- [`36f1bb5`](ffi/ffi@36f1bb5) Bump VERSION to 1.11.0
- [`29c07a9`](ffi/ffi@29c07a9) Pass options from rake task to the FFI::Generator
- [`7efdd2e`](ffi/ffi@7efdd2e) Include the name of the template file instead of just rake
- [`bc99b7e`](ffi/ffi@bc99b7e) Add proper documentation to FFI::Generator and ::Task
- Additional commits viewable in [compare view](ffi/ffi@1.9.18...1.11.1)
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=ffi&package-manager=bundler&previous-version=1.9.18&new-version=1.11.1)](https://help.github.com/articles/configuring-automated-security-fixes)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

 ---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `dependabot rebase` will rebase this PR
- `dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `dependabot merge` will merge this PR after your CI passes on it
- `dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `dependabot cancel merge` will cancel a previously requested merge and block automerging
- `dependabot reopen` will reopen this PR if it is closed
- `dependabot ignore this [patch|minor|major] version` will close this PR and stop Dependabot creating any more for this minor/major version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language

You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/facebook/watchman/network/alerts).

</details>
Pull Request resolved: #759

Differential Revision: D18285622

Pulled By: wez

fbshipit-source-id: bff26e77b99faaed6a47716a25400e3efd622fdc
@caco13
Copy link

caco13 commented Jan 14, 2020

On Ubuntu 19.04 the only thing that worked for me was checking out the v4.9.0 tag and compiling with:

./configure --without-python  --without-pcre --enable-lenient

Hope this helps someone in the future.

No errors but a lot of warnings with those options. Apparently the watchman was installed.

@artemesian
Copy link

On Ubuntu 19.04 the only thing that worked for me was checking out the v4.9.0 tag and compiling with:

./configure --without-python  --without-pcre --enable-lenient

Hope this helps someone in the future.

Thanks alot helped pass the make step ubuntu 20.04 bitmoji

@harbingerofdoom
Copy link

build/ARM/dev/ide_ctrl.cc: In constructor 'IdeController::Channel::Channel(std::__cxx11::string, Addr, Addr)':
build/ARM/dev/ide_ctrl.cc:85:40: warning: 'void* memset(void*, int, size_t)' clearing an object of type 'struct IdeController::Channel::BMIRegs' with no trivial copy-assignment; use assignment or value-initialization instead [-Wclass-memaccess]
memset(&bmiRegs, 0, sizeof(bmiRegs));
^
In file included from build/ARM/dev/ide_ctrl.cc:49:
build/ARM/dev/ide_ctrl.hh:83:16: note: 'struct IdeController::Channel::BMIRegs' declared here
struct BMIRegs
^~~~~~~
At global scope:
cc1plus: error: unrecognized command line option '-Wno-constant-conversion' [-Werror]
cc1plus: error: unrecognized command line option '-Wno-for-loop-analysis' [-Werror]
cc1plus: error: unrecognized command line option '-Wno-potentially-evaluated-expression' [-Werror]
cc1plus: error: unrecognized command line option '-Wno-mismatched-new-delete' [-Werror]
cc1plus: error: unrecognized command line option '-Wno-undefined-var-template' [-Werror]
cc1plus: error: unrecognized command line option '-Wno-inconsistent-missing-override' [-Werror]
cc1plus: all warnings being treated as errors
scons: *** [build/ARM/dev/ide_ctrl.o] Error 1
scons: building terminated because of errors.

I tried the above experiments but none of them seems to work in sconscript.
How can i resolve it? I am using gcc 8.3 and on CentOs 8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants