FreeBSD inkscape installation - freebsd

During installation of inkscape from ports on FreeBSD I get this error:
Looks like inscape among other installs ghostscript9-base which triggeres an error. See compilation process below:
===> Installing for ghostscript9-base-9.06_11
===> ghostscript9-base-9.06_11 depends on file: /usr/local/share/ghostscript/fonts/a010013l.pfb - found
===> ghostscript9-base-9.06_11 depends on shared library: libexpat.so - found (/usr/local/lib/libexpat.so)
===> ghostscript9-base-9.06_11 depends on shared library: libfreetype.so - found (/usr/local/lib/libfreetype.so)
===> ghostscript9-base-9.06_11 depends on shared library: libidn.so - found (/usr/local/lib/libidn.so)
===> ghostscript9-base-9.06_11 depends on shared library: libjbig2dec.so - found (/usr/local/lib/libjbig2dec.so)
===> ghostscript9-base-9.06_11 depends on shared library: liblcms2.so - found (/usr/local/lib/liblcms2.so)
===> ghostscript9-base-9.06_11 depends on shared library: libpaper.so - found (/usr/local/lib/libpaper.so)
===> ghostscript9-base-9.06_11 depends on shared library: libpng.so - found (/usr/local/lib/libpng.so)
===> ghostscript9-base-9.06_11 depends on shared library: libtiff.so - found (/usr/local/lib/libtiff.so)
===> ghostscript9-base-9.06_11 depends on shared library: libfontconfig.so - found (/usr/local/lib/libfontconfig.so)
===> ghostscript9-base-9.06_11 depends on shared library: libcupsimage.so - found (/usr/local/lib/libcupsimage.so)
===> ghostscript9-base-9.06_11 depends on shared library: libvga.so - found (/usr/local/lib/libvga.so)
===> ghostscript9-base-9.06_11 depends on shared library: libjpeg.so - found (/usr/local/lib/libjpeg.so)
===> ghostscript9-base-9.06_11 depends on shared library: libiconv.so - found (/usr/local/lib/libiconv.so)
===> Checking if ghostscript9-base already installed
===> Registering installation for ghostscript9-base-9.06_11 as automatic
Installing ghostscript9-base-9.06_11...
pkg-static: ghostscript9-base-9.06_11 conflicts with ghostscript9-nox11-9.06_10 (installs files into the same place). Problematic file: /usr/local/bin/dvipdf
*** Error code 70
Stop in /usr/ports/print/ghostscript9-base.
*** Error code 1
Stop in /usr/ports/print/ghostscript9-base.
*** Error code 1
Stop in /usr/ports/print/texlive-base.
*** Error code 1
Stop in /usr/ports/print/texlive-texmf.
*** Error code 1
Stop in /usr/ports/print/tex-formats.
*** Error code 1
Stop in /usr/ports/devel/doxygen.
*** Error code 1
Stop in /usr/ports/devel/doxygen.
*** Error code 1
Stop in /usr/ports/textproc/librevenge.
*** Error code 1
Stop in /usr/ports/textproc/librevenge.
*** Error code 1
Stop in /usr/ports/graphics/inkscape.
*** Error code 1
Stop in /usr/ports/graphics/inkscape.
Could you please advice on how to resolve this ?

The /usr/ports/UPDATING file contains following entry:
20150822:
AFFECTS: users of print/ghostscript*
AUTHOR:
hrs#FreeBSD.org
print/ghostscript{7,8,9,9-agpl} have been split into
print/ghostscript{7,8,9,9-agpl}-{base,x11}. print/ghostscript*-nox11
ports have been removed.
The -base installs Ghostscript binaries, libgs, and other data files
and it depends on no X11 library. The -x11 installs a small shared
library to enable x11* devices in the installed -base package.
In most cases, Ghostscript is installed as a dependency. A
port/package which requires Ghostscript will automatically pick up
-base, and when x11* devices required it will pick up -x11 in addition.
If one wants to install Ghostscript manually and full compatibility
with the previous versions, just install -x11 because it installs
-base as a dependency. Combination of the two provides the same functionality as before.
So, you need to run pkg delete -f ghostscript9-nox11 first and then proceed with inkscape installation.

Related

Why does/can my build access sysctl on Linux?

I inherited a C++ code with a dependency to OpenMPI that I want to delegate to Conan and CMake, and the automated build has a strange (to me at least) behavior related to sysctl that I want to understand.
How I tried to do it
I declared the required dependencies in my root CMakeLists.txt:
Note: I added the full list of requirements because I also suspect that some of them may be in conflict? That happened before with boost, that forced me to set explicitly zlib (if i remember correctly).
# stuff ...
conan_cmake_configure(
REQUIRES
zlib/1.2.12
mp-units/0.7.0
boost/1.79.0
openmpi/4.1.0
gsl/2.7
cspice/0067
GENERATORS
cmake
# that is required for cspice
CMakeDeps
CMakeToolchain
)
# more stuff ...
and then in the application CmakeLists.txt I find, include and link the executable to the required libraries:
add_executable(spock main.cpp)
find_package(cspice REQUIRED)
find_package(openmpi REQUIRED)
target_include_directories(
spock PRIVATE $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include>
openmpi_INCLUDE_DIRS
cspice_INCLUDE_DIRS
)
target_link_libraries(spock
CONAN_PKG::boost
CONAN_PKG::mp-units
openmpi::openmpi
cspice::cspice
)
# We need C++ 20 activated with the concepts library
target_compile_features(spock PUBLIC cxx_std_20)
Problem: undefined reference to sysctl ... on my local system only.
Building on my local machine with CMake 3.23.2 results in the following error message:
Consolidate compiler generated dependencies of target spock
[ 25%] Building CXX object src/CMakeFiles/spock.dir/main.cpp.o
^[[A^[[A[ 50%] Linking CXX executable ../bin/spock
/usr/bin/ld: /home/becheler/.conan/data/openmpi/4.1.0/_/_/package/8f7048d1bf6fc2a7985eb087c34e69a5e64f6c86/lib/libopen-pal.a(evutil_rand.o): in function `arc4_stir.isra.0':
evutil_rand.c:(.text+0x3d2): undefined reference to `sysctl'
collect2: error: ld returned 1 exit status
gmake[2]: *** [src/CMakeFiles/spock.dir/build.make:146: bin/spock] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:135: src/CMakeFiles/spock.dir/all] Error 2
gmake: *** [Makefile:146: all] Error 2
However, the same build on Github workflows on Ubuntu 20.04 works. What is weird. The only difference before apart the distribution version is that github wokflows use higher privileges than me on local (I believe?).
What I tried so far
I've been trying to read about what this sysctlreference is. And I found conflicting information:
Frrom this man page:
The sysctl() function retrieves system information and allows processes with appropriate privileges to set system information.
this similar SO question came to the conclusion that
Linux does not support this function (other OS like MacOS or FreeBSD support it)
A comment from the same post concludes that in Linux,
these details can be obtained by reading the kernel-provided
pseudofiles /proc/cpuinfo and /proc/meminfo
So here is my question: why does it compile at all on the remote server if this command is not supposed to exist on the OS used?

Cannot install z3 package for Haskell on Windows 10

I'm trying to install a project that uses the z3 package under Windows 10 and haskell stack with the following setup:
The z3 precompiled binaries (with includes under ./z3/includes and dll files under ./z3/bin) are located under the project root
myProject/
- app/
- dist/
- src/
- z3/
- package.yaml
- Setup.hs
- stack.yaml
- myProject.cabal
The package.yaml file contains:
dependencies:
- base >= 4.7 && < 5
- containers
- parsec
- z3 <= 408.0
The stack.yaml file contains:
extra-deps:
- z3-408.0#sha256:89bbc2d828dc1fe1f19666e8e501c69ce5d0ed8026e4a02f7eae1e69f4a352af
extra-include-dirs:
- ./z3/include
extra-lib-dirs:
- ./z3/lib
When I try to stack install I get the following error:
Process exited with code: ExitFailure 1
Logs have been written to: C:\Users\jmueller\repos\synthImp\.stack-work\logs\z3-408.0.log
z3-408.0: configure
Progress 1/2
-- While building package z3-408.0 using:
<...>
--extra-include-dirs=C:\Users\jmueller\repos\synthImp\./z3/include
<...>
--extra-lib-dirs=C:\Users\jmueller\repos\synthImp\./z3/lib
Configuring z3-408.0...
Cabal-simple_Z6RU0evB_2.4.0.1_ghc-8.6.5.exe: Missing dependency on a foreign
library:
* Missing (or bad) C library: z3
This problem can usually be solved by installing the system package that
provides this library (you may need the "-dev" version). If the library is
already installed but in a non-standard location then you can use the flags
--extra-include-dirs= and --extra-lib-dirs= to specify where it is.If the
library file does exist, it may contain errors that are caught by the C
compiler at the preprocessing stage. In this case you can re-run configure
with the verbosity flag -v3 to see the error messages.
The extra include and extra lib dirs are there and obviously the include is found too ... there seems to be a problem on the level of the c compiler
I tried both binaries for z3 (x64 and x86) and I don't know how to capture the output of the c preprocessor for further debugging.
Any help is highly appreciated!
Many thanks in advance

`stack build --nix` results in /bin/bash: bad interpreter: No such file or directory

I've previous solved this issue, but I don't remember what I did... So thought I'd post it here to settle it.
I'm trying to build a Haskell package with stack build nix, I'm following the answer from https://stackoverflow.com/a/47110522/1663462 but it runs into an error of:
Unpacking GHC into /home/chris/.stack/programs/x86_64-linuRunning /home/chris/.stack/programs/x86_64-linux-nix/ghc-8.0.2.temp/ghc-8.0.2/configure --prefix=/home/chris/.stack/programs/x86_64-linux-nix/ghc-8.0.2/ in directory /home/chris/.stack/programs/x86_64-linux-nix/ghc-8.0.2.temp/ghc-8.0.2/ exited with ExitFailure 1
checking for path to top of build tree...
/home/chris/.stack/programs/x86_64-linux-nix/ghc-8.0.2.temp/ghc-8.0.2/configure: utils/ghc-pwd/dist-install/build/tmp/ghc-pwd-bindist: /bin/bash: bad interpreter: No such file or directory
configure: error: cannot determine current directory
How can I solve this?
stack --nix setup results in:
Preparing to install GHC to an isolated location.
This will not interfere with any system-level installation.
Already downloaded.
Running /home/chris/.stack/programs/x86_64-linux-nix/ghc-8.0.2.temp/ghc-8.0.2/configure --prefix=/home/chris/.stack/programs/x86_64-linux-nix/ghc-8.0.2/ in directory /home/chris/.stack/programs/x86_64-linux-nix/ghc-8.0.2.temp/ghc-8.0.2/ exited with ExitFailure 1
checking for path to top of build tree...
/home/chris/.stack/programs/x86_64-linux-nix/ghc-8.0.2.temp/ghc-8.0.2/configure: utils/ghc-pwd/dist-install/build/tmp/ghc-pwd-bindist: /bin/bash: bad interpreter: No such file or directory
configure: error: cannot determine current directory
Error: Error encountered while configuring GHC with
/home/chris/.stack/programs/x86_64-linux-nix/ghc-8.0.2.temp/ghc-8.0.2/configure --prefix=/home/chris/.stack/programs/x86_64-linux-nix/ghc-8.0.2/
run in /home/chris/.stack/programs/x86_64-linux-nix/ghc-8.0.2.temp/ghc-8.0.2/
The following directories may now contain files, but won't be used by stack:
- /home/chris/.stack/programs/x86_64-linux-nix/ghc-8.0.2.temp/
- /home/chris/.stack/programs/x86_64-linux-nix/ghc-8.0.2/
Configuring GHC ...
nix:
enable: true
packages:
- pkgconfig
- autoconf
- gcc
- xorg.libX11
- xorg.libXext
- xorg.libXft
- xorg.libXinerama
- xorg.libXpm
- xorg.libXrandr
- xorg.libXrender
The above worked for me. I think it's just the autoconf that is needed. Answering with the full list in case it's not.

Stack can't find libgfortran-3.dll when trying to build with hmatrix

I am trying to setup hmatrix on my Windows 10 machine with GHC 8.0.2.
I was following the answer here but when I try to build it says that it cannot find libgfortran-3.dll although I am sure I added it to the bin folder in the BLAS directory.
My code is in here
I run stack build and this is what I get:
hmatrix-0.18.0.0: configure
Progress: 1/2
-- While building package hmatrix-0.18.0.0 using:
C:\sr\setup-exe-cache\x86_64-windows\Cabal-simple_Z6RU0evB_1.24.2.0_ghc-8.0.2.exe --builddir=.stack-work\dist\ca59d0ab configure "--with-ghc=C:\\Program Files\\Haskell Platform\\8.0.2\\bin\\ghc.EXE" "--with-ghc-pkg=C:\\Program Files\\Haskell Platform\\8.0.2\\bin\\ghc-pkg.EXE" --user --package-db=clear --package-db=global --package-db=C:\sr\snapshots\b201cfe6\pkgdb --package-db=D:\Haskell\networks\.stack-work\install\65995373\pkgdb --libdir=D:\Haskell\networks\.stack-work\install\65995373\lib --bindir=D:\Haskell\networks\.stack-work\install\65995373\bin --datadir=D:\Haskell\networks\.stack-work\install\65995373\share --libexecdir=D:\Haskell\networks\.stack-work\install\65995373\libexec --sysconfdir=D:\Haskell\networks\.stack-work\install\65995373\etc --docdir=D:\Haskell\networks\.stack-work\install\65995373\doc\hmatrix-0.18.0.0 --htmldir=D:\Haskell\networks\.stack-work\install\65995373\doc\hmatrix-0.18.0.0 --haddockdir=D:\Haskell\networks\.stack-work\install\65995373\doc\hmatrix-0.18.0.0 --dependency=array=array-0.5.1.1 --dependency=base=base-4.9.1.0 --dependency=binary=binary-0.8.3.0 --dependency=bytestring=bytestring-0.10.8.1 --dependency=deepseq=deepseq-1.4.2.0 --dependency=random=random-1.1-9tceXaeYIMZ4JrKq20Egog --dependency=split=split-0.2.3.1-FWyXC6nhV0H3AfM8IzrEFk --dependency=storable-complex=storable-complex-0.2.2-G9QzpmZTKvgKKVagrcRWdL --dependency=vector=vector-0.11.0.0-HhutbadagxHIONIkSRJEug -fopenblas --extra-include-dirs=C:\OpenBLAS-v0.2.19-Win64-int32\include --extra-include-dirs=C:\Users\Yotam\AppData\Local\Programs\stack\x86_64-windows\msys2-20150512\mingw64\include --extra-lib-dirs=C:\OpenBLAS-v0.2.19-Win64-int32\bin --extra-lib-dirs=C:\Users\Yotam\AppData\Local\Programs\stack\x86_64-windows\msys2-20150512\mingw64\lib
Process exited with code: ExitFailure 1
Logs have been written to: D:\Haskell\networks\.stack-work\logs\hmatrix-0.18.0.0.log
Configuring hmatrix-0.18.0.0...
Cabal-simple_Z6RU0evB_1.24.2.0_ghc-8.0.2.exe: Missing dependency on a foreign
library:
* Missing C library: libgfortran-3
This problem can usually be solved by installing the system package that
provides this library (you may need the "-dev" version). If the library is
already installed but in a non-standard location then you can use the flags
--extra-include-dirs= and --extra-lib-dirs= to specify where it is.
D:\OpenBLAS-v0.2.19-Win64-int32\bin includes both libopenblas.dll and libgfortran-3.dll and the blas directory was taken from this url
Thanks for any help
I've managed to install it as follows.
In yourpath\to\stack\x86_64-windows\msys2-20150512, open a msys2 shell by double-clicking on msys2_shell.bat.
In the shell, type:
pacman -S mingw-w64-x86_64-toolchain
Then add these "extra" in stack.yaml:
extra-include-dirs:
- yourpath\to\OpenBLAS\include
extra-lib-dirs:
- yourpath\to\OpenBLAS\lib
- yourpath\to\stack\x86_64-windows\msys2-20150512\usr\lib\gcc\x86_64-pc-msys\6.3.0
- yourpath\to\stack\x86_64-windows\msys2-20150512\mingw64\bin

Can't compile QT 5.5.1 on Amazon Centos: Project ERROR: Unknown module(s) in QT: quick

I am trying to compile QT 5.5.1 on Amazon AMI 2015.09, which looks la lot like Centos 6.5.
I keep getting this error:
Project ERROR: Unknown module(s) in QT: quick
However, there is no quick module that I can find, and no obvious way to enable to disable it from looking at the ./configure script.
My procedure:
I downloaded qt-everywhere-opensource-src-5.5.1.tar.gz
I unpacked it.
I ran ./configure
Confirmed that I want the opensource license and agreed to the LGPL.
Ran gmake -j4 (but I get the same behavior with gmake.
Interestingly, make distclean gives me this error:
Project ERROR: Unknown module(s) in QT: quick-private
Here are all of the errors sent to STDERR:
Checking for openal... Checking for bluez... no
Checking for bluez_le... no
Checking for btapi10_2_1... no
/home/ec2-user/qt-everywhere-opensource-src-5.5.1/qtmultimedia/qtmultimedia.pro:28: Variable GST_VERSION is not defined.
Checking for resourcepolicy... no
Checking for gpu_vivante... no
Checking for libbb2... no
no
Project MESSAGE: Unsupported Bluetooth platform, will not build a working QtBluetooth library.
Project MESSAGE: Either no Qt D-Bus found or no BlueZ headers.
qbluetoothdevicediscoveryagent_p.h:0: Note: No relevant classes found. No output generated.
qbluetoothservicediscoveryagent_p.h:0: Note: No relevant classes found. No output generated.
qbluetoothserver_p.h:0: Note: No relevant classes found. No output generated.
qbluetoothlocaldevice_p.h:0: Note: No relevant classes found. No output generated.
Checking for assimp... no
Project ERROR: Unknown module(s) in QT: quick
gmake[4]: *** [sub-textureandlight-make_first] Error 3
gmake[3]: *** [sub-canvas3d-make_first] Error 2
gmake[2]: *** [sub-canvas3d-make_first] Error 2
gmake[1]: *** [sub-examples-make_first] Error 2
gmake: *** [module-qtcanvas3d-make_first] Error 2
gmake: *** Waiting for unfinished jobs....
At another poster's suggestion I tried ./configure -skip qtquick but that didn't work:
$ ./configure -skip qtquick
+ cd qtbase
+ /home/ec2-user/qt-everywhere-opensource-src-5.5.1/qtbase/configure -top-level -skip qtquick
Attempting to skip non-existent module qtquick.
$
this is what I think will solve your problems:
You have use `make confclean' instead of making distclean for deleting the previous configuration.
Configure in verbose mode — more information will be provided, sorry, I don't remember exact flag, if I'm not mistaken, it's -v.
If you don't need quick, add -skip qtquick to the configure.

Resources