I call this command on GS 9.22 and GS 9.55 versions:
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/ebook -dNOPAUSE -dQUIET -dBATCH -sOutputFile=myOutput.pdf myInput.pdf
Using GS 9.22 version I can compress a certain PDF file from 8.5 MB to about 5.5 MB. Using GS 9.55 version on the same original file there is no compression at all.
Is this a bug in GS 9.55 version or is there a change in behavior?
Related
I'm trying to use ECW files in my application. I've built GDAL Library whit this command:
./configure --with-ecw:/usr/local/hexagon
after completion of build process, when I Entered:
gdalinfo --formats | grep ECW
I got:
ECW -raster- (rw+): ERDAS Compressed Wavelets (SDK 5.5)
JP2ECW -raster,vector- (rw+v): ERDAS JPEG2000 (SDK 5.5)
also when I've used
gdalinfo map.ecw
it returns all metadata of ECW files.
but when I compile my C++ program, it returns:
Error: GDAL Dataset returned null from read
ERROR 4: `map.ecw' not recognized as a supported file format.
Dose anyone know why I can't use ECW files in C++ program?
By the way, I use
Cmake
,GDAL 3.3.0
,Erdas-ECW SDK 5.5 hexagon
for building the program.
I found the answer. This problem occurs if the gdal_bin binary package is installed before creating GDAL.
Just make sure gdal_bin is deleted before installing the version you created.
When I was trying to figuring out this question What can I do differently after I install those missing debug info packages for gdb? asked by myself, I noticed that when I try to install the libstdc++ debug infos (test distro is CentOS 7.2):
debuginfo-install libstdc++-4.8.5-44.el7.x86_64
What the system is going to install are:
[root#VM-0-17-centos debug]# debuginfo-install libstdc++-4.8.5-44.el7.x86_64
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
debuginfo | 2.5 kB 00:00:00
debuginfo/7/x86_64/primary_db | 2.5 MB 00:00:02
--> Running transaction check
---> Package gcc-debuginfo.x86_64 0:4.8.5-44.el7 will be installed
--> Processing Dependency: gcc-base-debuginfo = 4.8.5-44.el7 for package: gcc-debuginfo-4.8.5-44.el7.x86_64
---> Package glibc-debuginfo.x86_64 0:2.17-307.el7.1 will be installed
--> Processing Dependency: glibc-debuginfo-common = 2.17-307.el7.1 for package: glibc-debuginfo-2.17-307.el7.1.x86_64
---> Package yum-plugin-auto-update-debug-info.noarch 0:1.1.31-54.el7_8 will be installed
--> Running transaction check
---> Package gcc-base-debuginfo.x86_64 0:4.8.5-44.el7 will be installed
---> Package glibc-debuginfo-common.x86_64 0:2.17-307.el7.1 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
========================================================================================================================
Package Arch Version Repository Size
========================================================================================================================
Installing:
gcc-debuginfo x86_64 4.8.5-44.el7 debuginfo 195 M
glibc-debuginfo x86_64 2.17-307.el7.1 debuginfo 9.5 M
yum-plugin-auto-update-debug-info noarch 1.1.31-54.el7_8 os 29 k
Installing for dependencies:
gcc-base-debuginfo x86_64 4.8.5-44.el7 debuginfo 2.9 M
glibc-debuginfo-common x86_64 2.17-307.el7.1 debuginfo 9.7 M
Transaction Summary
========================================================================================================================
Install 3 Packages (+2 Dependent packages)
Total download size: 217 M
Installed size: 1.0 G
Is this ok [y/d/N]: n
My question is:
Why libstdc++ debug infos(files) are installed via glibc debug infos? As I know, glibc is the GNU implemetation of standard C library. How would that relate to libstdc++ which is a C++ thing? I expect something called libstdc++-debuginfo to show on the list :)
I cannot install the R-package BH which I need only to install dplyr afterwards.
The download works but something is wrong with the processing afterwards, as there is no reaction or progress whatsoever. Installation of lubridate (and deinstallation of lubridate) in contrast worked smoothly without any problems.
My output is:
> install.packages("BH")
Installing package into ‘.../R/win-library/3.2’
(as ‘lib’ is unspecified)
versuche URL 'http://cran.univ-paris1.fr/bin/windows/contrib
/3.2/BH_1.58.0-1.zip'
Content type 'application/zip' length 13846684 bytes (13.2 MB)
downloaded 13.2 MB
and then nothing happens.
Any ideas what could be causing this behavior? Are there any prerequisites for the installation of BH?
> sessionInfo()
R version 3.2.1 (2015-06-18)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1
locale:
[1] LC_COLLATE=German_Germany.1252 LC_CTYPE=German_Germany.1252
[3] LC_MONETARY=German_Germany.1252 LC_NUMERIC=C
[5] LC_TIME=German_Germany.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
BH, as a sizeable subset of Boost Headers is big, as in really big:
edd#max:~$ du -csm /usr/local/lib/R/site-library/BH/
111 /usr/local/lib/R/site-library/BH/
111 total
edd#max:~$
That is 111 megabytes.
You may simply have run our of patience if your Windows (network share ?) was slow in writing the files.
BH is also widely used by other CRAN packages, and there has not been a package on any of the platforms used by CRAN.
So I suggest you maybe place your R package library onto a local hard drive...
If you have an actual bug report, please consider filing an issue ticket against our BH package.
I had this problem -- there were two parts to my fix.
1/ Download the windows binary from CRAN and save to the hard disk. You then select the menu item: Packages >> Install package(s) from local files…
2/ Edit the utils:::unpackPkgZip function to increase the sleep time – so that my virus checker has time to scan it. To implement this, do the following:
trace(utils:::unpackPkgZip, edit=TRUE)
Look for the line Sys.sleep(0.5), toward the bottom of the body of the function; it's a big package so I went for Sys.sleep(10).
If you are still seeing the error: Warning: unable to move temporary installation, try a longer sleep period.
Note that you won't see the edit if you check utils:::unpackPkgZip; that is the unedited version, and it can be restored via untrace(utils:::unpackPkgZip).
So see the edited version, use body(utils:::unpackPkgZip).
When running an app that uses Qt 4.7 on my Fedora 19 box I am getting the following errors from the application:
libGL: screen 0 does not appear to be DRI2 capable
libGL: OpenDriver: trying /usr/lib64/dri/tls/swrast_dri.so libGL: OpenDriver: trying /usr/lib64/dri/swrast_dri.so
libGL: Can't open configuration file /home/Matthew.Hoggan/.drirc: No such file or directory.
libGL error: failed to load driver: swrast ERROR: Error failed to create progam.
I do not see these errors in a stock X11 application where the context is configured using glx. I am assuming this is because Qt uses egl underneath. The same thing happens when using the EGL 3 emulator from http://malideveloper.arm.com/develop-for-mali/tools/opengl-es-3-0-emulator/ while running their cube example.
I have already verified that both xorg-x11-drv-nvidia-libs.i686 and yum install xorg-x11-drv-nvidia-libs.x86_64 rpms are installed.
My system information is:
Linux localhost.localdomain 3.11.9-200.fc19.x86_64 #1 SMP Wed Nov 20 21:22:24 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
And glxinfo is:
[Matthew.Hoggan#localhost QtTest]$ glxinfo | grep version
server glx version string: 1.4
client glx version string: 1.4
GLX version: 1.4
OpenGL core profile version string: 4.3.0 NVIDIA 331.38
OpenGL core profile shading language version string: 4.30 NVIDIA via Cg compiler
OpenGL version string: 4.4.0 NVIDIA 331.38
OpenGL shading language version string: 4.40 NVIDIA via Cg compiler
Any suggestions here or is more information needed?
We were able to get rid of the same error messages for octave-4.0.0-rc1 which also use Qt. The bug hunting history can be found here.
It turned out to be an incorrect runpath in a shared library (.so). The runpath contained /usr/lib64. Hence at runtime the /usr/lib64/libGL.so was loaded, instead of the right nvidia /usr/X11R6/lib64/libGL.so.
Workaround
Find the lib or executable which has the incorrect runpath with ldd <app or lib> and chrpath -l <app or lib>
Replace the wrong path with the correct one (without the offending /usr/lib64) using chrpath -r <correct path> <app or lib>
The following one-liner did this for liboctgui.so. Just replace "liboctgui.so" by your value.
chrpath -r $(chrpath -l liboctgui.so | cut -d '=' -f '2' | awk '{gsub(/\/usr\/lib64/, "")}; 1') liboctgui.so
Origin
The incorrect runpath was picked up at compilation time from an irrelevant
-L/usr/lib64 in libQt*.la files located in /usr/lib64.
The comment #18 explains why it is wrong.
And indeed, lib*.la files should not be packaged, according to OpenSUSE own recommendations
Avoid packaging libtool config files (.la files). If you do not
package a static library, and if you are also placing the shared
library in a standard search directory (i.e. %_lib, /usr/%_lib), they
will not be needed.
Removing lib*.la from /usr/lib64 and rebuilding fixed the problem for good.
I try to pack some map files for our geoserver in an internal rpm package. For the build part, this is just to copy the files. I think this works as expected. But it takes terribly long to pack those 20GB of images.
I've read that rpm internally compresses the data and that this can be done with several different compression algorithms. But, I don't have a clue which compression my rpm chooses and how I can influence this. I could not find any options for the rpmbuild command, nor for the specfile nor for the general rpm options I can list with rpmbuild --showrc
I´m not very experienced with rpmbuild and specfiles, but after reading lots of man pages and tutorials on rpm.org I have no further ideas.
The specfile I use looks like:
%define debug_package %{nil}
%global mapsversion 0.9
# If this is a snapshot, put the date here and uncomment
#global snapshot_version 20100519
# This is the version in a form acceptable
# an an RPM version string (i.e. no '-')
# Hier werden die Makros definiert.
%global rpmversion %(echo %{mapsversion} | tr '-' '_')
%global pkgversion %{mapsversion}%{?snapshot_version:-SNAPSHOT}
%global pkgname %{name}
Name: geoserver-maps-part2
Version: %{rpmversion}
Release: 1%{?dist}
Summary: Swiss Maps for GeoServer
Group: Application/ourApp
License: Copyright (c) 2011
URL: http://doc.polyalert.local
#Source0: %{name}-%{version}.tgz
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: geoserver
%define mapshome /opt/geoserver/swisstopo
%define mapssource /home/user/polyalert_env/geoserver/swisstopo
%description
Swiss Maps for GeoServer
%prep
%build
/bin/true
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{mapshome}
cp -a %{mapssource}/pk100 $RPM_BUILD_ROOT%{mapshome}
%clean
rm -rf $RPM_BUILD_ROOT
%pre
%post
%preun
%files
%{mapshome}/pk100
%changelog
* Tue Feb 14 2012 user - 1.0
- First version of specfile
I call rpmbuild like this:
rpmbuild -bb --define "_topdir $TOP_DIR" --define "_gpg_name ourkey" --define "_signature gpg" --sign $TOP_DIR/SPECS/$SPEC_FILE_NAME $RPM_BUILD_PARAMETER
Any suggestions?
I was working with some RPM stuff today and accidentally stumbled upon the answer for ya!
Put these in your spec file:
%define _source_payload w0.gzdio
%define _binary_payload w0.gzdio
That will still use gzip but pass it -0 for a level, which should just store. On my RPM, it made it grow from 21MB to 76MB, so I'm pretty sure this is your answer!
BTW, I found that in one of the macro files - you can also do bzdio and any number from 0 to 9 to use bzip2. This was on RHEL4; later versions of RPM seem to support more compression options; but again, for what you want, the above should be what you need.
Please check the file /usr/lib/rpm/macros in your build machine, (the file maybe diff in path), it has a total support list of compression methods there: e.g.:
329 # Compression type and level for source/binary package payloads.
330 # "w9.gzdio" gzip level 9 (default).
331 # "w9.bzdio" bzip2 level 9.
332 # "w7.xzdio" xz level 7, xz's default.
333 # "w7.lzdio" lzma-alone level 7, lzma's default
334 #
335 #%_source_payload w9.gzdio
336 #%_binary_payload w9.gzdio
so here just as Aaron said, you can set it here for universal, or set specifically for your proj. spec.
I have used "%define _binary_payload w9.xzdio" on RHEL 6.6. As I understand, the default compression tool used in RHEL 6 is xz, but the default compression level appears to be 2, even though 7 is supposed to be xz's default. I kicked it up to 9 and some giant RPMs went from 653MB to 439MB. I was able to save a total of 1 gigabyte over the default compression.
I ran into the same issue with Ant building a runnable Jar RPM with Spring Boot Loader complaining of this:
Caused by: java.lang.IllegalStateException: Unable to open nested entry 'BOOT-INF/lib/accessors-smart-1.2.jar'. It has been compressed and nested jar files must be stored without compression. Please check the mechanism used to create your executable jar file
My ant build task was like this:
<exec executable="rpmbuild" failonerror="true">
<env key="version" value="${fullversion}" />
<arg value="-ba" />
<arg value="--clean" />
<arg value="${specfile}" />
</exec>
My solution to build an RPM with a runnable JAR was to disable the repacking, setting the macro definitions on the spec file did not do it for me.
Adding this to the spec file was what worked for me:
#Disable jar unpacking
%define __jar_repack 0
Reference:
https://bugzilla.redhat.com/show_bug.cgi?id=219731
Thanks to the previous posters for helping to focus in on the issue too.
Erion