Git Product home page Git Product logo

Comments (10)

DragoonX6 avatar DragoonX6 commented on May 16, 2024 1

This looks like a nightmare on *nix systems, such as linux or BSD, where libraries are expected to be installed to /usr/lib or in rare cases /usr/lib/$pkgname. This honestly seems like a very MSVC centric thing. In the case of MSVC, you can easily configure the output directory yourself.

Also this "Like I would expect other C++ libraries or SDKs to come with debug and release versions.", practically only happens with MSVC builds. For any other compilers you're required to build it yourself, and is still done by MSVC users because of MT/MD differences.
An option could be to output seperate debug symbols and a symbol map, which is enough information in most cases. If it isn't, the user can always build and install debug versions themselves.

from eastl.

Leandros avatar Leandros commented on May 16, 2024 1

Yes, @rparolin has to re-open the issue.
To chip in, as the guy who introduced the install target first, I think it's wrong in general to have multiple versions of the same library installed. The install target is either used as a dependency for another project (the reason why I added the install target), or installed for the whole operating system to use. In the former case, the EASTL should be compiled accordingly to the parent project settings, in the former case, a system wide installed library should never be debug. I think the change doesn't make sense at all.

from eastl.

rparolin avatar rparolin commented on May 16, 2024

Does it make sense to install debug libraries in this case?

from eastl.

pzychotic avatar pzychotic commented on May 16, 2024

Definitely, as I expect the output of the install step to be used as 3rd party dependencies in other projects. Like I would expect other C++ libraries or SDKs to come with debug and release versions.

If you see the install step as something that is not used in a development environment like a *nix system where other production ready software can be build from source, than this might not be appropriate.

from eastl.

rparolin avatar rparolin commented on May 16, 2024

I'm just unfamiliar with the concept of installing libraries in this way. I don't see a problem with adding this functionality to EASTL if its helpful to people. Feel free to send a PR.

from eastl.

DragoonX6 avatar DragoonX6 commented on May 16, 2024

Reopening, I don't understand why this has been merged as the OP didn't test his PR and this is breaking on unix-like systems, like I explained in my previous post.
${BUILD_TYPE} is wrong, to get the desired behavior, you need to write ${CMAKE_BUILD_TYPE}.
But again, this is not the correct solution, the better solution is the one you explained earlier and that is using a postfix.

Edit: Apparently posting a comment doesn't reopen the issue, I think rparolin has to do this.

from eastl.

rparolin avatar rparolin commented on May 16, 2024

I'm not sure how installations are used but EASTL doesn't offer binary compatibility between releases. I didn't a problem with including a feature that people thought was useful. It isn't great in my opinion that we can't/don't test it though. The argument could be made that we shouldn't support installations.

from eastl.

DragoonX6 avatar DragoonX6 commented on May 16, 2024

On Linux you're expected to do
pacman -S EASTL
g++ -std=c++11 file_that_uses_EASTL.cpp -lEASTL -o executable_using_EASTL
This breaks the ability to do that, now you need to -L/usr/lib/Release depending on where your distro installs it.
To retain compatibility between releases distros usually change the name of the library to something like EASTL.so.1.0 and then two symlinks which are name EASTL.so.1 and EASTL.so, and the order is EASTL.so->EASTL.so.1->EASTL.so.1.0. The linker will resolve the symlink at link time and will search for EASTL.so.1.0 when it runs.
Or we can simply link EASTL as a static library, so binary compatibility is out of the picture.
Either way, I think this shouldn't be included in EASTL, given the reasons given already.

from eastl.

pzychotic avatar pzychotic commented on May 16, 2024

Sorry for the trouble this caused!

'...as the OP didn't test his PR and this is breaking on unix-like systems ... ${BUILD_TYPE} is wrong, to get the desired behavior, you need to write ${CMAKE_BUILD_TYPE}.'

Apparently I did test the PR with VS and it does work, been using this for years before generator expressions where a thing. I wasn't aware that this doesn't work on single configuration generators like makefiles.
CMAKE_BUILD_TYPE is not an option since this is only defined on single configuration generators.

'...the better solution is the one you explained earlier and that is using a postfix.'
As stated earlier, I assume that renaming the libs is a breaking change. If this would be ok todo, this would be an option.

One other solution would be to put the install line with that change into an 'if(MSVC)' and keep the original got everything else.

from eastl.

rparolin avatar rparolin commented on May 16, 2024

I haven't seen any activity here. Can I close this issue?

from eastl.

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.