Coder Social home page Coder Social logo

Build Error about ycm-generator HOT 3 CLOSED

rdnetto avatar rdnetto commented on July 29, 2024
Build Error

from ycm-generator.

Comments (3)

rdnetto avatar rdnetto commented on July 29, 2024

Looking at the grappa repo, it appears to use cmake (indirectly, via the configure script). The problem is that once cmake generates a Makefile, that Makefile has the compiler hardcoded. YCM-Gen relies on being able to override the compiler (via the CC / CXX variables).

I think the best approach would be to eliminate the dependency on the generated makefile by converting GrappaRDD to use cmake. (I assume cmake has some native way of including other cmake files). That way it's generated with the compiler variables set correctly.

An alternative (easier) approach would be to just generate the config file for grappa, then copy it into the GrappaRDD folder with some minor changes.

from ycm-generator.

EntilZha avatar EntilZha commented on July 29, 2024

I originally was using cmake for GrappaRDD, but couldn't figure out how to include the grappa.mk file which configures my code to link against Grappa. If you know how to do that, would be great since I am fairly new to make/cmake with C/C++.

I will try your second suggestion, that seems like it might work pretty easily since GrappaRDD doesn't have any external dependencies.

from ycm-generator.

rdnetto avatar rdnetto commented on July 29, 2024

Based on the output of make, my guess is you could add something like this to the makefile:

LDFLAGS="-Wl,-rpath  -Wl,/usr/local/lib  -Wl,--enable-new-dtags  -L$(GRAPPA_PREFIX)/build/Make+Release/install/lib -L/usr/local/lib -L/usr/lib/x86_64-linux-gnu"
LDLIBS="-lGrappa -lglog -lgflags -lgraph500-generator -lboost_system -lboost_filesystem -Wl,-Bdynamic -lmpicxx -lmpi -lpthread -lrt"

all: main
main: main.o
main.o: RDD.hpp GrappaContext.hpp
    $(CXX) -c $(CPPFLAGS) $(CXXFLAGS)

into the Makefile.

I suggest reading the docs on implicit rules and variables, since they explain what's happening behind the scenes.

You could also just copy and paste the line from the makefile (replacing g++ with $(CXX)) but that's less maintainable.

from ycm-generator.

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.