Coder Social home page Coder Social logo

libmodule's People

Contributors

fededp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

libmodule's Issues

pkg-config file is broken when CMAKE_INSTALL_{INCLUDE,LIB}DIR is absolute

As per title: Extra/libmodule.pc.in has

prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=@CMAKE_INSTALL_PREFIX@
libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@

and so can’t handle absolute paths in CMAKE_INSTALL_{INCLUDE,LIB}DIR. This leads to broken .pc files on NixOS in particular.

See “Concatenating paths when building pkg-config files” for a thorough discussion of the problem and a suggested fix, or KDE’s extra-cmake-modules for a simpler approach.

Compiler warnings

Building on Ubuntu 16.04 with stock compiler flags. GCC version 5.4.0.

$ ninja
[5/7] Building C object CMakeFiles/module.dir/Lib/modules.c.o
../Lib/modules.c: In function ‘modules_ctx_loop_events’:
../Lib/modules.c:78:25: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Wunused-result]
                         read(p->fd, (void **)&msg.pubsub_msg, sizeof(pubsub_msg_t *));
                         ^
[5/7] Building C object CMakeFiles/module.dir/Lib/module.c.o
../Lib/module.c: In function ‘tell_if’:
../Lib/module.c:403:9: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
         write(mod->pubsub_fd[1], &mm, sizeof(pubsub_msg_t *));
         ^
[7/7] Creating library symlink libmodule.so.3 libmodule.so

Doesn't configure with cmake 3.5

$ cmake ..
CMake Error at CMakeLists.txt:3 (project):
  project with VERSION must use LANGUAGES before language names.


-- Configuring incomplete, errors occurred!
$ cmake --version
cmake version 3.5.1

CMake suite maintained and supported by Kitware (kitware.com/cmake).

It looks like cmake 3.5.1 does not support the "DESCRIPTION" attribute to project():

$ cmake --help-command project
[...]
 project(<PROJECT-NAME> [LANGUAGES] [<language-name>...])
 project(<PROJECT-NAME>
         [VERSION <major>[.<minor>[.<patch>[.<tweak>]]]]
         [LANGUAGES <language-name>...])

[...]

I see two solutions: either change cmake_minimum_required (which will mean more work for me, since I will have to build a separate cmake) or change the file to be compatible with the currently specified minimum cmake version.

I tried adding "LANGUAGES C" in the middle as well as the end of that list, but that doesn't work, getting errors such as "Could not find cmake module file: CMakeDetermineDESCRIPTIONCompiler.cmake".

Removing the description does work however, I'm not sure if it can be added in some other way instead perhaps. It might be possible to do an if statement on cmake version and do two different project clauses as well.

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.