GithubHelp home page GithubHelp logo

Comments (5)

wanyuac avatar wanyuac commented on August 10, 2024 1

I had the same error message as @xiangzhou when I was compiling GEMMA on ubuntu with GCC v5.4.0.

It is a problem of the compiler we have used. As one of my colleagues suspected, I finally got GEMMA compiled successfully using gcc-4.9.3. It seems that the code "SNPINFO sInfo={"-9", rs, -9, -9, minor, major, -9, -9, (long int) -9};" is not compatible with gcc-5+. @xiangzhu @DSLituiev

There is another way to get round of this problem using gcc-5. We can change the class definition:

class SNPINFO { public: ... size_t n_miss; ... };

into

class SNPINFO { public: ... ssize_t n_miss; ... };

However, I would not recommend this method because I am not sure if the substitution of data types would affect results.

from gemma.

echubaty avatar echubaty commented on August 10, 2024 1

@wanyuac Thank you, your fork of this repo worked for me. The only modification I had to make for my environment was changing CPP to g++-4.9 since I now have multiple versions installed.

from gemma.

xiangzhu avatar xiangzhu commented on August 10, 2024

@xiangzhou I get the same build error with gcc-5; and I also get the same error using g++ (Ubuntu 6.2.0-3ubuntu11~16.04) 6.2.0 20160901.

Here is the error from gcc-6.

src/io.cpp: In function ‘bool ReadFile_bgen(const string&, const std::set<std::__cxx11::basic_string<char> >&, const gsl_matrix*, std::vector<int>&, std::vector<int>&, std::vector<SNPINFO>&, const double&, const double&, const double&, const double&, std::size_t&)’:
src/io.cpp:2165:73: error: narrowing conversion of ‘-9’ from ‘int’ to ‘std::size_t {aka long unsigned int}’ inside { } [-Wnarrowing]
     SNPINFO sInfo={"-9", rs, -9, -9, minor, major, -9, -9, (long int) -9};
                                                                         ^
Makefile:108: recipe for target 'src/io.o' failed
make: *** [src/io.o] Error 1

from gemma.

pcarbo avatar pcarbo commented on August 10, 2024

@wanyuac @xiangzhu @echubaty @DSLituiev Can one of you please check to see if this issue is now resolved? See also Issue #24, which reported the same problem (although using a different C++ compiler).

from gemma.

pjotrp avatar pjotrp commented on August 10, 2024

Guix version compiles fine with latest gcc compilers.

from gemma.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.