I love github and open source but when you have to install a library that isn’t in your os’s repository, oh boy.
In my current project, I need freetype. It compiles with make and make install. Now it’s in my usr/lib/freetype2 and usr/include/freetype2 directory. The only problem is that the source files expect it to be in usr/lib and usr/include. The only fix is to manually change every include until it matches. You can get creative with find and replace but there is no 1 command fix and no matter what it’s always a lot of work and consumes a lot of time.
While I could sit down and actually do that, I’m just going to have to do the same thing every time I want to compile it on a different distro or on a different system. I’d rather put the files in my source directory so it’ll just compile every time so I only have to do this once.
I’m reasonably sure this isn’t what you’re supposed to do but I’ve shoehorned the last several libraries I needed into my project this way.
Is there a better way?
lurch@sh.itjust.works 2 months ago
i don’t. i install the dev package of my distro and didn’t run into a case where it’s not available yet. also, i make fake packages for my project with only dependencies, to install those things, so i can uninstall that fake package when i don’t need the project any more and don’t have to keep track what dev deps on my system are still required
PhilipTheBucket@ponder.cat 2 months ago
I think you cracked the code. I was really curious what distribution this person was using that didn’t have freetype, but missing installing the -dev package makes perfect sense and I definitely remember doing that and tearing my hair out trying to figure out why I couldn’t compile some thing that needed dev headers.
OP, install libfreetype-dev or its equivalent on your system. 90% chance that fixes it.
dbx12@programming.dev 2 months ago
I really love the
–virtual
of Alpine’s apk system.