Leptonica fails all regression tests - build

When I try installing building Leptonica 1.72 downloaded from their website: http://www.leptonica.com/download.html using the default installation route:
./configure
make
make check
I got 64/67 tests failed. I looked into this problem and installed some missing dependencies and when I tried building and checking again, 68/68 tests failed this time. Has anyone had the same problem? Where should I look to find the problem?

The problem turned out to be that I needed root permissions to run the tests.
sudo make check
and all 68 tests passed. I'll look more into why I got the problem( maybe because I built with root permissions and then when I tested it without them, couldn't access the root-created test files and fails the tests. )
Tip: build without root permissions and only run with root permissions
make install

Related

Trouble getting cpplint to work on Jenkins

Does anyone know how to install cppcheck on Jenkins? I installed the plugin through Manage Jenkins > Manage Plugins but when I follow the instructions and included an "execute shell" build step, it fails.
cppcheck src
returns an log file like this:
cppcheck: not found
Build step 'Execute shell' marked build as failure
I tried looking at some online tutorials, but they didn't seem to help fix the problem. Should I use the CLI to install cppcheck on Jenkins, rather than the web UI? I don't think that will fix the issue, as it seems that cppcheck is not installed on the server.
Any help or guidance would be appreciated. Thanks!

how to use apt-buildpack from cloudfoundry repo

The apt-buildpack is experimental and not yet intended for production use. I guess that's why also no documentation.
Creating container
Successfully created container
Downloading app package...
Downloaded app package (862.7K)
Warning: this buildpack can only be run as a supply buildpack, it can not be run alone
Failed to compile droplet: Failed to compile droplet: exit status 1
Destroying container
Exit status 223
Stopping instance abdfc8d0-699e-4834-9f2d-2b8aec218423
Successfully destroyed container
Can you give me example how to push cf-env sample app and install for example rtorrent and/or openvpn. Is it possible to install gnome for testing purposes?
As far as usage goes it's pretty simple, you just need to include an apt.yml in the root directory of your app. That should contain among other things, the list of packages to install.
Ex:
---
packages:
- ascii
- libxml
- https://example.com/exciting.deb
The buildpack supports installing package names, deb files, custom APT repositories, and even PPAs.
Please see the README for further instructions.
This message:
Warning: this buildpack can only be run as a supply buildpack, it can not be run alone
Is telling you that the Apt buildpack only functions to supply binaries. It doesn't actually know how to run your app or any application. For more on the supply script, check out the docs here.
The trick to making it work is that you need to use multi buildpack support. Instructions for doing that can be found here. This should work with most apps, but there's a simple example here.
Once your app stages & starts, you can confirm that your packages were installed by running cf ssh apt-test -t -c "/tmp/lifecycle/launcher /home/vcap/app bash ''". Anything that was installed should be on the path, but if you want to see where things are installed it'll be under the /home/vcap/deps/<buildpack-number>/.
That should be about it. Hope that helps!

Blockchain Hyperledger Fabric dev env setup

I am very close to set up dev environment for hyperledger fabric and following this link
https://github.com/IBM-Blockchain/learn-chaincode/blob/master/docs/setup.md
When I run this command git clone -b v0.6 http://gerrit.hyperledger.org/r/fabric
and run go build. I get following error:
can't load package: package github.com/hyperledger/fabric: no
buildable Go source files in
/Users/test/work/src/github.com/hyperledger/fabric
However when I run step 4 from the link, the build success.
cd $GOPATH/src/github.com//learn-chaincode/start
go build ./
Here build is not succeed only for http://gerrit.hyperledger.org/r/fabric.
Any thoughts?
Please suggest!
I think the manual is not precisely written here. You are not supposed to run go build . on the cloned fabric repository. The manual just states here, that if you are getting build errors later, the clone into your go sources did not work. I is not asking you to build the fabric repository. If your build command is executed in step 4, everything should be set up correctly.
Assuming you are setting up the dev environment you want to build things for that after cloning the repo. This is done with make, thus e.g. make all to build and test all.
To build chaincode later on you use go build in the folder where you have the chaincode source file.

maven downloading file on every run 'install' target called

I am using appfuse-spring 2.2.snapshot artifact in my project. I am using maven is 3 .
When I run maven target 'install' every time download the same jar and dependency file.
How can I avoid to download the same files again and again.
for example
Downloading: http://oss.sonatype.org/content/repositories/appfuse-snapshots/org/appfuse/appfuse-web/2.2.2-SNAPSHOT/maven-metadata.xml
I don't want to download the jar file again.
Thanks in advance.
Why it's will download again and again? If it's always downloading maybe something is wrong because once the library is in your local repository it shouldn't need to download anything unless a dependency changes.
If you want to disable the download, use -o (offline) option in your mvn command:
mvn install -o
More: Maven Command Line Options
The problem is that you download the snapshot. Maven check a snapshot dependency each build (and if require downloads it).
Please avoid depend of snapshots.
Please find your deps in the releases repository:
https://oss.sonatype.org/content/repositories/appfuse-releases/
Old question but probably the solution would have been to check the "updatePolicy" for the repo, its possibly set to "always".

Hudson Maven build fails using workspace POM, works when pointing to development copy

I'm developing a series of web applications using Eclipse IDE, Maven, SVN, and Hudson for CI.
When I specify the "Root POM" option in my Hudson job to be the copy of pom.xml in its workspace directory, the build fails citing compilation failure due to missing classpath entries.
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Compilation failure
C:\Users\djones\.hudson\jobs\Store\workspace\trunk\src\main\java\com\app\store\model\User.java:[24,42] package org.hibernate.validator.constraints does not exist
C:\Users\djones\.hudson\jobs\Store\workspace\trunk\src\main\java\com\app\store\dao\UserGroupHibernateSupportDao.java:[8,20] package org.hibernate does not exist
C:\Users\djones\.hudson\jobs\Store\workspace\trunk\src\main\java\com\app\store\dao\UserGroupHibernateSupportDao.java:[10,49] package org.springframework.orm.hibernate3.support does not exist
When I specify the "Root POM" to be the copy of pom.xml in my Eclipse workspace, it builds just fine. It builds fine from Eclipse too.
I want to move Hudson over to a separate machine so several developers can use it, so I can't very well point to my own development workspace to give it a POM. If I try putting an SVN URL in the "root pom.xml" option, it says file not found.
What should I be entering here for a project worked on by several developers, and hosted in an SVN repository?
Turns out some of the dependencies were set as runtime and not compile, so it was my own fault for not paying attention. I'd still like to know why it worked fine when pointing to my Eclipse workspace copy of the POM though?