using brew install that compile the project locally - compilation

I'm working on migrating my project to the new Apple Silicon architecture (arm64).
One of my 3rd party libraries still doesn't have arm64 version on supplier website but luckily it's an open source project so I wanted to compile it myself locally.
Unfortunately, the project docs have missing prerequisites regarding how to compile, but apparently home-brew already provides this lib built under arm64 and can be deployed using brew install.
For security reasons I wish to compile it locally, So I'd like to see how brew compile it.
I was wondering if there's any way to use brew install so that it also compile the project locally and not just copy its pre-made targets to my machine.
Thanks !

Related

Is vcpkg installing debug or release version of the library?

How can I check if vcpkg installed debug/release version of a library?
I'm on macOS Monterey but I guess this applies to other OS also.
I did vcpkg install qt5 and after a few hours it looks like it installed everything (almost).
After adding the kit from vcpkg on QtCreator, I can build/run a simple Qt based project in release mode but in debug mode it fails with:
vcpkg install both versions. Qt IDE integration however works only for release builds unless you are allowed to specify a qt.conf file to use for customized lookup. Typically IDE integrations just look for qmake without any way to customize it... which only allows one build config to work in vcpkg

Add DCMTK library and compile for Xcode 12.4+

I'm trying to install and add the DCMTK library to my Xcode project. The library can be found here https://dicom.offis.de/training.php.en
I ran the command to install via home-brew brew install dcmtk but I'm not sure how to add the library and start using it in my project. I have no idea how to add this to my dependencies in Xcode. I managed to successfully compile Horus which uses the framework, but it gives a BAD_ACCESS error after running and I'm not sure how they managed to get it to work? It appears they run it as a build target that then runs CMake behind the scenes? I'm not familiar with this style of doing it. This is the link to the Horos Project that uses the library in the way I need to (https://github.com/horosproject/horos)
I see many questions regarding this with older versions of Xcode that no longer compile with the newest Xcode which is why I'm asking this question here. Any help is greatly appreciated!

How to integrate react-native-text-detector successfully?

The documentation for this library's install has been followed step for step.
npm install react-native-text-detector --save
added pod "RNTextDetector", path: '../node_modules/react-native-text-detector/ios to pod file
did not manually link binary or add file to library in Xcode
However the build continually fails. it fails in the same way when trying to integrate react-native-tesseract-ocr, one of the dependencies for this library.
the build error:
-weak_library and -bitcode_bundle (Xcode setting ENABLE_BITCODE=YES) cannot be used together
I was having the same problem...
After some more research, I looked into a few things regarding tesseract-ocr for iOS that helped get everything up and running as expected.
Install react-native-text-detector per the repo's README
Added the linker flag -lstdc++ in Xcode build settings
Set the build setting Enable Bitcode to NO in Xcode build settings
Followed the README in this repo, https://github.com/Kila2/libstdc-.6.0.9.tbd/blob/master/README.md
After that I was able to build and run both on the iOS simulator and on a test device.
I have 11.3, the latest stable version.

Building a debian package for Mono GTK# app that doesn't rely on xamarin assemblies?

I built up a debian package for my solution so that I can actually distribute the app.
But when I put it on a clean machine I get the error:
Dependency is not satisfiable: libmono-corlib4.5-cil(>=4.0.0-alpha1)
If I do a sudo apt-get install mono-complete on the clean machine I can see that libmono-corlib4.5-cil is installed but it's listed as (3.2.8+dfsg-4ubuntu1.1, automatic). Looking at my dev machine the lib installed there is 4.0.5.1-0xamarin1, so it came from the monodevelop install.
Is there anyway to resolve this while creating the debian package?
You can make your package dependent upon one (or more) of the libmono-xxxx packages that are available from Xamarin/Mono:
i.e.
libmono-corlib4.5-cil_4.0.5.1-0xamarin1_all.deb
That would require that you have the Mono-Project repos added to one of your /etc/apt/sources.list.d/ files....
Ref: http://download.mono-project.com/repo/debian/pool/main/m/mono/
Other than that, you would need to build, if possible, and package your project to ref. the Mono that is available in the std. Debian repo; i.e. 3.2.8

Installing openCV on Lion OS 10.7.4 Xcode 4.3.2

I'm trying to install openCV on university's iMac,
but the problem is our university's network is so strict.
and I couldn't install openCV using MacPorts.
I tried google to look for a way to install but it all failed
i guess because it is kind of old ways and because my network is so strict.
So if anybody knows a way that I can download a ready framework with how to use it inside
Xcode. or at least a framework with how to install it to work with Xcode.
or a way to download from the source and compile it then install it in Xcode
please.
Because I tried the cmake way and I still have no luck to get it work.
thanks in advance.
sources I used:
http://salemsayed.me/?p=240
http://opencv.willowgarage.com/wiki/InstallGuide
http://opencv.willowgarage.com/wiki/Mac_OS_X_OpenCV_Port
http://www.ient.rwth-aachen.de/cms/software/opencv/
I'm using Lion + Xcode 4.x branch, with OpenCV svn trunk. Everything works fine. You have to install cmake first, then get the code from the svn following the instructions at http://code.opencv.org . The compilation process worked fine for me for all the core modules + the Qt module + the GPU module + TBB acceleration.
The instructions are the same as the Linux platform.
After setting up cmake configuration in a terminal (using ccmake for a more interactive tool),
I set the architecture to x86_64 (on my MBP Core 2 Duo), the target directory to /usr/local/(the default), and I have Intel TBB installed in /usr/local/.
Cmake generates the makefiles for you, so you just have to type make -j2 to compile, then sudo make install. If you're working on a workstation, then you have more CPU power, and you can replace the value 2 by more, e.g. 8.

Resources