Checksum failed 'download/jpegsrc.v8b.tar.gz while installing SDL. How to resolve? - perl

I am trying to install SDL but error with checksum occur:
Building Alien-SDL-1.446
Build option used:
Source code build
z(v1.2.5) jpeg(v8b) tiff(v3.9.1) png(v1.4.1) freetype(v2.3.12) SDL(v1.2.15) SDL_image(v1.2.11) ogg(v1.3.0) vorbis(v1.3.3) SDL_mixer(v1.2.12) SDL_ttf(v2.0.11) SDL_gfx(v2.0.25)
Building Alien-SDL
Fetching 'http://froggs.de/libz/zlib-1.2.5.tar.gz'...
Checking checksum for 'download/zlib-1.2.5.tar.gz'...
Fetching 'http://www.ijg.org/files/jpegsrc.v8b.tar.gz'...
###WARN## checksum for file download/jpegsrc.v8b.tar.gz is 033998fb47d66e1a5e16a51243424be7a172296b but we expect 15dc1939ea1a5b9d09baea11cceb13ca59e4f9df
###ERROR### Checksum failed 'download/jpegsrc.v8b.tar.gz' at inc/My/Builder.pm line 161.
Checking checksum for 'download/jpegsrc.v8b.tar.gz'...
-> FAIL Installing Alien::SDL failed. See /home/kes/.cpanm/work/1634308125.20978/build.log for details. Retry with --force to force install it.
Searching Tie::Simple on mirror index /home/kes/work/projects/SDL/test/local/cache/modules/02packages.details.txt ...
--> Working on Tie::Simple
Fetching http://cpan.metacpan.org/authors/id/H/HA/HANENKAMP/Tie-Simple-1.04.tar.gz
-> OK
How to install SDL?

_build/config_data has the wrong first source set for jpeg v8b. The second source passes the sha1sum, but the first doesn't. If the correct archive is downloaded, the system then hangs up when configuring SDL. SDL_image and SDL_mixer can be manually configured, but SDL_ttf cannot be configured successfully. One should not rely on cpan's sources here. Install all the binary SDL1.2 libraries in a binary distro, also install packages e.g. perl-Alien, libalien-sdl-perl libalien-sdl-dev-perl to have alien installed, and then when it runs the Build.PL for SDL, choose the option to use your own /usr/ libraries (you will see 3 options if it works, choose [1] instead of [2]). Cpan will then succeed with install SDL.
There should be extra instructions with this, that you need to use binary libraries here. Because the script install is super outdated as far as I can tell, if you are running linux that is.

Related

Haskell and postgresql - build error "The program pg_config is required but it could not be found."

I am currently learning haskell and just tried using postgresql as a database.
I generated my project with stack (stack new <name> -> stack setup -> stack build)
and then all I changed was adding the dependencies needed to persistent and postgresql to the
package.yaml file (under "dependencies:").
These are:
persistent
persistent-postgresql
persistent-template
This however results in a failing build with the following message:
postgresql-libpq > setup.exe: The program 'pg_config' is required but it could not be found.
postgresql-libpq >
-- While building package postgresql-libpq-0.9.4.2 using:
C:\Users\\AppData\Local\Temp\stack14388\postgresql-libpq-0.9.4.2.stack-work\dist\e626a42b\setup\setup --builddir=.stack-work\dist\e626a42b configure --user --package-db=clear --package-db=global --package-db=C:\sr\snapshots\365a3dde\pkgdb --libdir=C:\sr\snapshots\365a3dde\lib --bindir=C:\sr\snapshots\365a3dde\bin --datadir=C:\sr\snapshots\365a3dde\share --libexecdir=C:\sr\snapshots\365a3dde\libexec --sysconfdir=C:\sr\snapshots\365a3dde\etc --docdir=C:\sr\snapshots\365a3dde\doc\postgresql-libpq-0.9.4.2 --htmldir=C:\sr\snapshots\365a3dde\doc\postgresql-libpq-0.9.4.2 --haddockdir=C:\sr\snapshots\365a3dde\doc\postgresql-libpq-0.9.4.2 --dependency=Cabal=Cabal-2.4.1.0-5rQrtDcYhR2LOcYye7obEr --dependency=Win32=Win32-2.6.1.0 --dependency=base=base-4.12.0.0 --dependency=bytestring=bytestring-0.10.8.2 -f-use-pkg-config --extra-include-dirs=C:\Users\\AppData\Local\Programs\stack\x86_64-windows\msys2-20180531\mingw64\include --extra-lib-dirs=C:\Users\\AppData\Local\Programs\stack\x86_64-windows\msys2-20180531\mingw64\lib --extra-lib-dirs=C:\Users\\AppData\Local\Programs\stack\x86_64-windows\msys2-20180531\mingw64\bin --exact-configuration --ghc-option=-fhide-source-paths
Process exited with code: ExitFailure 1
Does anyone know how to resolve this issue and why it even occurs?
Do I have to install postgresql just for being able to run build the project? If so, how would you
do this in production, when the database could basically lie everywhere?
It looks like Haskell is trying to build with the PostgreSQL client shared library libpq.dll and uses pg_config at build time to determine where PostgreSQL is installed and how it was built.
That would mean that you have to install PostgreSQL on the machine where you build Haskell, including the header files, build environment or however it is called by the installer.
For running Haskell you would only need libpq.dll and the dependent shared libraries.
I solved the issue in Ubuntu with the following command:
apt install libpq-dev

Error "Did you compile with -rdynamic?" seen only when application installed using RPM

I have a Vala application that loads modules just gmodule-2.0, when installed through usual make install means everything works correctly. When I build an RPM file and install (on Fedora 27) using dnf install my-app I get a whole bunch of errors like
(my-app:15094): Gtk-WARNING **: Could not find signal handler 'btn_thing_changed_cb'. Did you compile with -rdynamic?
(my-app:15094): Gtk-WARNING **: Could not find signal handler 'adj_thing_value_changed_cb'. Did you compile with -rdynamic?
Even after I add -rdynamic to the build and reinstall I continue to see these errors. Somewhere I read that I need to use gmodule-export-2.0, but the diff on it's pkgconfig and the one for gmodule-2.0 shows that they're exactly the same. Soooo...
The application is written in Vala and built using valac. Also, the UI classes that I have are Gtk template classes which may be an issue, but the fact that it works when I install from source makes me think that it isn't.
This is because the default RPM build will strip the symbols out of executables. You can disable stripping by changing your spec file to include:
%global __os_install_post %{nil}
or:
%global __strip /bin/true

Installing Tensorflow from source

I've been trying to install Tensorflow and get it working over the past few days. Whilst I have managed to install TF and get it working as tested by opening Python in the terminal and typing,
import tensorflow as tf
I have not been successful attempting to retrain Inception v3. I managed to install it from source once by following the instructions laid out here however I am no longer able to do so. When I get to the section 'Create the pip package and install' and go to run bazel build -c opt //tensorflow/tools/pip_package:build_pip_package in the root of my Tensorflow directiory I get the following error.
kieran#kieranUbuntu:~/tensorflow$ bazel build -c opt //tensorflow/tools/pip_package:build_pip_package
ERROR: /home/kieran/tensorflow/tensorflow/core/BUILD:1068:1: no such target '//tensorflow/tools/git:gen/spec.json': target 'gen/spec.json' not declared in package 'tensorflow/tools/git' defined by /home/kieran/tensorflow/tensorflow/tools/git/BUILD and referenced by '//tensorflow/core:version_info_gen'.
ERROR: /home/kieran/tensorflow/tensorflow/core/BUILD:1068:1: no such target '//tensorflow/tools/git:gen/head': target 'gen/head' not declared in package 'tensorflow/tools/git' defined by /home/kieran/tensorflow/tensorflow/tools/git/BUILD and referenced by '//tensorflow/core:version_info_gen'.
ERROR: /home/kieran/tensorflow/tensorflow/core/BUILD:1068:1: no such target '//tensorflow/tools/git:gen/branch_ref': target 'gen/branch_ref' not declared in package 'tensorflow/tools/git' defined by /home/kieran/tensorflow/tensorflow/tools/git/BUILD and referenced by '//tensorflow/core:version_info_gen'.
ERROR: Analysis of target '//tensorflow/tools/pip_package:build_pip_package' failed; build aborted.
INFO: Elapsed time: 3.063s
This is the same error I ran into when I managed to install it and then attempted retaining the classifier following this tutorial. At the section, bazel build tensorflow/examples/image_retraining:retrain.
I just can't figure out what is going wrong and I have been trying for so long.
I'm using this pip version, # Ubuntu/Linux 64-bit, CPU only, Python 2.7
I think you should search before ask, This link can probably solve your issue.
The issue lied in the incorrect use of ./configure. Whilst it was ran I currently have two versions of python on my computer, both of which are stored in different locations, when running ./configure I pointed it to the wrong python version. After rectifying the issue everything worked correctly.

Bundle config for production only?

I'm getting an error when deploying my application to CentOS 6.x similar to the following: An error occurred while installing pg (0.17.1), and Bundler cannot continue
I've installed the required libs but am still getting the error.
ERROR: Error installing pg:
ERROR: Failed to build gem native extension.
/home/exporter/.rbenv/versions/2.1.5/bin/ruby extconf.rb
checking for pg_config... no
No pg_config... trying anyway. If building fails, please try again with
--with-pg-config=/path/to/pg_config
checking for libpq-fe.h... no
Can't find the 'libpq-fe.h header
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
From reading around it seems like I need to add --with-pg-config=/path/to/pg_config. I can easily do this by configuring bundler to install with the flag:
bundle config build.pg --with-pg-config=/usr/pgsql-9.4/bin/pg_config
But how can I do this without affecting my local dev environment? The /path/to/pg_config will be different for my production environment and my local dev environment.

Using Scons to build mongo-nonx86 on an arm based Synology NAS

I have a Synology DS212j NAS (cpu Feroceon 88FR131 rev 1 (v5l)) with the optware ipkg installed. I am trying to build mongo-nonx86 on it.
"scons all" gives me the following messages:
scons: Reading SConscript files ...
scons version: 2.0.1
python version: 2 5 6 'final' 0
Checking whether the C++ compiler worksyes
Checking for C library stdc++... no
can't find stdc++ library which is needed
I have the stdc++ library installed, I also have ssl installed. My underlying question is how can I get scons to tell me more about what is really missing, where it is looking, how it is looking etc. I have so far found no options which generate any more useful diagnostic output?
Obviously a ready-made solution for getting mongodb working on this great little box would be even more welcome :-)
Well even if you do have it installed, it doesn't seem to think so, here is what I would try to do, install libssl-dev, then try to install the dev package for libstdc++, which is: libstdc++-dev.
Then see if you can compile it.