How can we download Artifacts using CMake from JFrog repository using JFrog key?
We are migrating our build system from Makefile to CMake. We used to upload and download artifacts from JFrog Artifactory using curl as following.
curl -v -X PUT --data-binary #"$localFilePath" "$target" -H "X-JFrog-Art-Api: $apiKey"
Now we are moving to CMake so would like to resolve this dependency using CMake FetchContent module but I didn't find any way to download artifacts using X-JFrog-Art-Api in FetchContent.
The FetchContent argument URL_HASH accepts ALGO=Value where algo can be either variants of SHA or MD5 but their is no way to provide ALGO as X-JFrog-Art-Api.
Any help on this will be greatly appreciated.
I am trying following code to download the artifact from JFrog Artifactory and its failing as X-JFrog-Art-Api is not a valid ALGO in CMake.
FetchContent_Declare(
dependency
URL ${dependency_url}
URL_HASH "X-JFrog-Art-Api=XXXXX"
)
Related
I can't download previous versions of prebid.js.
I want prebid.js of 2.XX.X, but it is not on the download site.
If you do the following curl command
curl -o prebid2.44.7.js -X POST -d "modules%5B%5D=33acrossBidAdapter&modules%5B%5D=adgenerationBidAdapter&modules%5B%5D=ajaBidAdapter&modules%5B%5D=aolBidAdapter&modules%5B%5D=appnexusBidAdapter&modules%5B%5D=audienceNetworkBidAdapter&modules%5B%5D=criteoBidAdapter&modules%5B%5D=logicadBidAdapter&modules%5B%5D=microadBidAdapter&modules%5B%5D=aolBidAdapter&modules%5B%5D=aolBidAdapter&modules%5B%5D=open8BidAdapter&modules%5B%5D=openxBidAdapter&modules%5B%5D=openxoutstreamBidAdapter&modules%5B%5D=pubmaticBidAdapter&modules%5B%5D=rtbhouseBidAdapter&modules%5B%5D=rubiconBidAdapter&modules%5B%5D=yieldoneBidAdapter&modules%5B%5D=currency&modules%5B%5D=dfpAdServerVideo&modules%5B%5D=yieldoneAnalyticsAdapter&version=2.44.7" https://js-download.prebid.org/download
"Prebid file not built properly" is displayed.
I don't know the cause.
It was possible to build by the method below.
curl -LO https://github.com/prebid/Prebid.js/archive/2.44.7.tar.gz
tar zxvf 2.44.7.tar.gz
cd Prebid.js-2.44.7
npm install
gulp build --modules=XXXXXXXX,YYYYYYYY
Not sure how that was actually working before, but what I would do is:
Install the prebid library from source: https://github.com/prebid/Prebid.js
Use git checkout tags/2.44.7
Build the library using the docs in the prebid readme
I am adding Conan support to my CMake projects. I followed Recipe and sources in the same repo tutorial and I end up with the expected package. Exploring the local repository folder, I found out that my source files are copied in 3 different folders (source, build and export_source) so the repo is growing fast even with small projects.
Is there a way to clean repository folders where sources are duplicated, after package creation (keeping only the folder needed for "dependency build from sources")?
Sure, you can remove things from the cache with the conan remove command. In this case you probably want to do:
conan remove "*" -s -b -f
* to match all packages in your local cache
-s to remove the source folders
-b to remove the build folders
-f to not ask for confirmation
The sources stored together with the conanfile.py in the cache, can't be removed, cause they are stored with the conanfile to be able to rebuild from sources when conan install --build is done.
Getting the following error when running cmake and am unsure how to fix it. It seems like it's telling me exactly what to do, but not very familiar with Linux.
CMake Error at CMakeLists.txt:153 (find_package):
By not providing "FindGnuradio.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Gnuradio",
but CMake did not find one.
Could not find a package configuration file provided by "Gnuradio"
(requested version 3.7.3) with any of the following names:
GnuradioConfig.cmake
gnuradio-config.cmake
Add the installation prefix of "Gnuradio" to CMAKE_PREFIX_PATH or set
"Gnuradio_DIR" to a directory contaning one of the above files. If
"Gnuradio" provides a separate development package or SDK, be sure it has
been installed.
EDIT: So I've located something called FindGnuradioRuntime.cmake but am still unsure what to do with it. The error message makes me think it was looking for something named "FindGnuradio.cmake" when it was actually called "FindGnuradioRuntime.cmake"
Commands that were run on a fresh Ubuntu install:
git clone git://git.osmocom.org/rtl-sdr.git
cd rtl-sdr/
mkdir build
cd build
cmake ../
make
sudo make install
sudo ldconfig
git clone git://git.osmocom.org/gr-osmosdr
cd gr-osmosdr/
mkdir build
cd build/
cmake ../ (here is where I ran into a the problem above)
Install / build GNU Radio.
Remove the CMakeCache.txt
When you call cmake .. you can pass arguments. Add the path to the parent directory of GnuradioConfig.cmake or FindGnuRadio.cmake as in
cmake -DCMAKE_PREFIX_PATH=/gnu/radio/path ..
Making my somewhat hidden response an actual answer:
Just found out that the install script provided on GNURadio's website not only installs GNURadio, but also the RTL SDR requirements as well, so I wiped my VM and started over and was successful. It takes a few hours, but it is complete and automated so definitely the best way to install GNURadio. Script is here http://www.sbrac.org/files/build-gnuradio
As previous answers noted you didn't describe where you ran into this problem. I'm going to assume it happened when creating an Out Of Tree (OOT) module.
On the OOT Module Page, see the "Notes" Section. They note that you need to install gr-dev. That package will install GnuradioConfig.cmake. You can find it in the standard yum repos, and install it with sudo yum install gnuradio-devel.
I want to download the source codes of json-simple library using maven2 command line interaface. So, I download this .pom file into ~/project/pom.xml
http://json-simple.googlecode.com/svn/trunk/pom.xml
And then, using the relevant SO question's answer: How to install Maven artifact with sources from command line?, I try to download source codes with the following commands,
$ cd ~/project
$ mvn eclipse:eclipse -DdownloadSources=true
$ ls
The output is only the pom.xml. What is wrong?
$ mvn --version
Apache Maven 2.2.1 (rdebian-8)
Use the get goal of the dependency plugin
Full command line (execute somewhere - you do not need a pom)
mvn -DgroupId=com.googlecode.json-simple
-DartifactId=json-simple
-Dversion=1.1.1
-Dclassifier=sources
-DremoteRepositories=http://nexus.dmz1.heuboe.hbintern:8080/nexus/content/repositories/central/
org.apache.maven.plugins:maven-dependency-plugin:2.8:get
or as a oneliner
mvn -DgroupId=com.googlecode.json-simple -DartifactId=json-simple -Dversion=1.1.1 -Dclassifier=sources -DremoteRepositories=http://nexus.dmz1.heuboe.hbintern:8080/nexus/content/repositories/central/ org.apache.maven.plugins:maven-dependency-plugin:2.8:get
Normally I am using Maven 3 but I tested this also with Maven 2.2.1 on Windows and it works.
You can also consider to use the m2e Maven Integration in eclipse (check the eclipse Marketplace to install this if not already installed) instead of the maven-eclipse-plugin (eclipse:eclipse). You than have an eclipse preferences option to download the sources.
I am trying to use the module "plot_trisurf()" in matplotlib. My python compile gives an error that axes3D does not contain the module. I want to install the latest version of matplotlib.
I would like to use the steps provided here: http://matplotlib.org/faq/installing_faq.html
In source install, step 2 is "delete the build directory in source tree". What is the source tree and where do i find the right build directory to delete?
Any suggestions are appreciated. Thank you for your time.
The source tree is under what ever directory you clone the git repo into or unpack the tarball into. It will contain a whole bunch (~30) of folders and files including lib, CXX, and INSTALL. If you have previously built matplotlib there will be a folder build where the results of the build are stored, if you have not yet run your first build it will not exist.
If you have cloned the git repo the following:
git clean -f -d -x
will remove any untracked files for you.