Jump to content

"cc1plus: error: to generate dependencies you must specify either -M or -MM" or missing lib/precompiled.h


Recommended Posts

Hi,

I'm trying to the travis-ci service to work for testing of some my customizations. The system is quite outdated, but it should work (see details below) - I've no trouble building in an Ubuntu 12.04 lxc container. I'm setting up the system and building with

$ sudo apt-get -qq update$ sudo apt-get -qq install python-software-properties$ sudo add-apt-repository --yes ppa:wfg/0ad.dev$ sudo add-apt-repository --yes ppa:ubuntu-toolchain-r/test$ sudo apt-get -qq update$ sudo apt-get -qq build-dep 0ad$ sudo apt-get -qq install gcc-4.8 g++-4.8 cmake pkg-config$ sudo apt-get -qq remove oracle-java7-installer oracle-java8-installer postgresql-9.2 postgresql-contrib-9.2 postgresql-9.2-postgis-2.1 postgresql-9.3 postgresql-contrib-9.3 postgresql-9.3-postgis-2.1 postgresql-9.4 postgresql-contrib-9.4 postgresql-9.4-postgis-2.1 postgresql-9.1 postgresql-9.1-postgis-2.1 postgresql-9.1-postgis-scripts postgresql-9.2-postgis-scripts postgresql-9.3-postgis-scripts postgresql-9.4-postgis-scripts postgresql-client postgresql-client-9.1 postgresql-client-9.2 postgresql-client-9.3 postgresql-client-9.4 postgresql-client-common postgresql-common postgresql-contrib-9.1$ yes | sudo apt-get -yy --yes dist-upgrade$ export CC=gcc-4.8 CXX=g++-4.8$ cd build/workspaces$ ./update-workspaces.sh$ cd gcc$ make CPPFLAGS=-I/usr/include/SDL

where I'm experiencing the problem that `make` either fails due to `cc1plus: error: to generate dependencies you must specify either -M or -MM` if `CFLAGS="-M -MM" CXXFLAGS="-M -MM"` is omitted or due to missing `lib/precompiled.h` if they're specified.

I searched for solutions fixing the error message regarding missing -M/-MM options and figured that adding -MM is the way to go<ref>http://stackoverflow.com/questions/26203032/hello-world-project-will-not-compile</ref>, but then I have no explanation why `lib/precompiled` isn't generated (because of missing understanding what -M and -MM are good for - _after_ reading the `gcc` manpage section about it). I tried `gcc` 4.6, 4.7 and 4.8 without noticing any difference which I'm installing from the `ppa:ubuntu-toolchain-r/test` PPA and which work without any trouble in the Ubuntu 12.04 lxc container.

System information:

$ uname -a && lsb_release -aLinux testing-worker-linux-89e97461-1-15272-linux-4-69692739 2.6.32-042stab090.5 #1 SMP Sat Jun 21 00:15:09 MSK 2014 x86_64 x86_64 x86_64 GNU/LinuxNo LSB modules are available.Distributor ID:    UbuntuDescription:    Ubuntu 12.04 LTSRelease:    12.04Codename:    precise

See https://travis-ci.org/krichter722/0ad/jobs/69599045 and https://travis-ci.org/krichter722/0ad/jobs/69575782 for detailed build logs of the two failures.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...