Git Product home page Git Product logo

Comments (3)

SLongshaw avatar SLongshaw commented on August 22, 2024

Apologies, a bug report should have been included before closing.

Including this patch broke an existing implementation of MUI + OpenFOAM, compiled with GCC 7.3.0 on a Debian based system. The compilation error is due to there being multiple definitions of specialisations found in endian_traits.h.

e.g.:

"In function mui::detail::endian_converter<2ul>::htobe()': (.text+0x0): multiple definition of mui::detail::endian_converter<2ul>::htobe()'
(.text+0x0): first defined here
In function mui::detail::endian_converter<2ul>::betoh()': (.text+0x10): multiple definition of mui::detail::endian_converter<2ul>::betoh()'
(.text+0x10): first defined here
In function mui::detail::endian_converter<4ul>::htobe()': (.text+0x20): multiple definition of mui::detail::endian_converter<4ul>::htobe()'
(.text+0x20): first defined here
In function mui::detail::endian_converter<4ul>::betoh()': (.text+0x30): multiple definition of mui::detail::endian_converter<4ul>::betoh()'
(.text+0x30): first defined here
In function mui::detail::endian_converter<8ul>::htobe()': (.text+0x40): multiple definition of mui::detail::endian_converter<8ul>::htobe()'
(.text+0x40): first defined here
In function mui::detail::endian_converter<8ul>::betoh()': (.text+0x50): multiple definition of mui::detail::endian_converter<8ul>::betoh()'
(.text+0x50): first defined here....."

I suspect this is down to the fact that MUI is embedded as a class that is then utilised by a good majority of other OpenFOAM classes, rather than the more traditional use-case of simply including mui.h at the top of a not heavily-OO design. However, as the original code worked without error on the same system, I reverted the changes to avoid it being broken for any other user of the master branch.

More details will be provided in any future bug reports.

from mui.

rupertnash avatar rupertnash commented on August 22, 2024

Thanks Stephen! With that clue I reproduced the issue in LAMMPS (using MUI in main() and in a custom fix for the communication ). I'd forgotten that explicit specialisations are not implicitly inline. I've got a fix on my traits branch - I'll make a PR

from mui.

SLongshaw avatar SLongshaw commented on August 22, 2024

I have integrated the fix and all seems well this time, so I'll leave the patch applied unless somebody else comes across a problem. I'm going to close this bug for now.

from mui.

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.