How to know how many arguments can be used for compiling vim totally? - vim

My vim was compiled with the following configure.
./configure --prefix=/usr/local/ \
--with-features=huge \
--enable-multibyte \
--enable-cscope=yes \
--enable-perlinterp=yes \
--enable-rubyinterp=yes \
--with-ruby-command=/usr/bin/ruby \
--enable-luainterp=yes \
--enable-pythoninterp=yes \
--enable-python3interp=yes \
--enable-tclinterp=yes \
--enable-gui=gtk3 \
--enable-cscope \
--enable-xim \
--enable-fontset \
--with-x --with-compiledby=$USER
How to know how many arguments can be used for compiling vim totally?
And almost same puzzle,how to know how many arguments can be used for compiling ffmpeg totally?
By what method?
Is there a sentence describing that there are xxxx arguements for compling vim such as ..... in some manul?

You can find the list of all arguments simply with the help command :
:help feature-list

Related

Qemu giving an drive with bus=0, unit=0 (index=0) exists error

This is the entire command, but i can't seem to work over it for some reason.. HELP
qemu-system-x86_64 \
-m 1G \
-cpu host \
-enable-kvm \
-boot order=d \
-drive file=Win10_1803_English_x64.iso,media=cdrom \
-drive file=windows10.img,format=raw,if=virtio \
-drive file=virtio-win.iso,media=cdrom \
-vnc :0 \

Compiled opencv3.2.0 on ubuntu16.04 failed

I failed to compile opencv3.2.0 on ubuntu 16.04,that is the error:
Build output check failed:Regex: 'command line option .* is valid for .* but not for C++'
I tried to add -D CMAKE_C_COMPILER=/usr/bin/gcc-5 and -D ENABLE_CXX11=ON but it didn't work...So how can i solve this problem?
Ubuntu 16.04.6 - amd64 : Build opencv-3.2.0
sudo apt build-dep opencv
sudo apt install cmake python3-dev python3-numpy libgl1-mesa-dev libgoogle-glog-dev \
libgphoto2-dev liblapack-dev libleptonica-dev libprotobuf-dev libraw1394-dev libtbb-dev \
libtesseract-dev libv4l-dev maven-repo-helper ocl-icd-opencl-dev protobuf-compiler \
python-dev libtiff-dev libswscale-dev python-vtk *gstreamer*-dev linux-libc-dev \
libavresample-dev libatlas-cpp-0.6-dev libopenblas-dev doxygen \
libinsighttoolkit4-dev liblapacke-dev
tar xvf opencv_3.2.0+dfsg.orig.tar.gz
cd opencv-3.2.0+dfsg/
tar xvf ../opencv_3.2.0+dfsg-6.debian.tar.xz
mkdir build && cd build/
cmake -DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DOPENCV_MATHJAX_RELPATH=/usr/share/javascript/mathjax/ \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_EXAMPLES=ON \
-DINSTALL_C_EXAMPLES=ON \
-DINSTALL_PYTHON_EXAMPLES=ON \
-DWITH_FFMPEG=ON \
-DWITH_GSTREAMER=OFF \
-DWITH_GTK=ON \
-DWITH_JASPER=OFF \
-DWITH_JPEG=ON \
-DWITH_PNG=ON \
-DWITH_TIFF=ON \
-DWITH_OPENEXR=ON \
-DWITH_PVAPI=ON \
-DWITH_UNICAP=OFF \
-DWITH_EIGEN=ON \
-DWITH_VTK=ON \
-DWITH_GDAL=ON \
-DWITH_GDCM=ON \
-DWITH_XINE=OFF \
-DWITH_IPP=OFF \
-DBUILD_TESTS=OFF \
-DCMAKE_SKIP_RPATH=ON \
-DWITH_CUDA=OFF \
-DENABLE_PRECOMPILED_HEADERS=OFF \
-DWITH_IPP=OFF \
-DWITH_CAROTENE=OFF \
-DOPENCL_INCLUDE_DIR:PATH="/usr/include/CL/" ../
make ## no errors
.
[100%] Linking CXX executable ../../bin/opencv_version
.
[100%] Built target opencv_version

Cropping a PDF with Ghostscript v7.07

I'm trying to crop a PDF that is purposely being output over sized since the program outputting it doesn't know the size of it's contents. On the FreeBSD system in question there is Ghostscript v7.07 installed. Based on the existing answer on another question (Cropping a PDF using Ghostscript 9.01) and adapting it to v7.07 documentation (http://ghostscript.com/doc/7.07/Readme.htm) I've tried the below replacing the -o with -sOutputFile= since it doens't recognize the -o.
gs \
-dNOPAUSE \
-dBATCH \
-sDEVICE=pdfwrite \
-c "[/CropBox [0 6785 433 7128]" \
-c " /PAGES pdfmark" \
-sOutputFile=testout.pdf \
testin.pdf \
and i've also tried
gs \
-dNOPAUSE \
-dBATCH \
-sDEVICE=pdfwrite \
-dDEVICEWIDTHPOINTS=433 \
-dDEVICEHEIGHTPOINTS=343 \
-dFIXEDMEDIA \
-c "0 6785 translate" \
-c "0 0 433 343 rectclip" \
-sOutputFile=testout.pdf \
testin.pdf \
My problem is that in both cases i just get the below message
**** Unable to open the initial device, quitting.
When searching for that error it mostly seemed to be due to the output file location not having write privileges or something similar to that, but that doesn't appear to be the case because I've chmod my folder to 777. The thing that drove me here is that if i remove the postscript command lines (-c) like below it outputs the testout.pdf file just fine (but obviously not cropped or translated to the correct position).
gs \
-dNOPAUSE \
-dBATCH \
-sDEVICE=pdfwrite \
-sOutputFile=testout.pdf \
testin.pdf \
and
gs \
-dNOPAUSE \
-dBATCH \
-sDEVICE=pdfwrite \
-dDEVICEWIDTHPOINTS=433 \
-dDEVICEHEIGHTPOINTS=343 \
-dFIXEDMEDIA \
-sOutputFile=testout.pdf \
testin.pdf \
I thought maybe 7.07 simply didn't support those commands since it doesn't seem to matter what i put within the -c it always ends up giving that error if the -c is there at all, but it is present in the 7.07 documentation (http://ghostscript.com/doc/7.07/Use.htm#General_switches) and it's not like it's giving me a -c is unknown error, so i'm at a loss. I figure I'm either doing something wrong, or there is something wrong with the ghostsciprt installation or it's dependencies. Any help anyone could give me would be greatly appreciated.
OK first off UPGRADE you are using a 13+ year old version of software.
Secondly, your command line is incorrect, you are using -c but you have not supplied the matching -f This means that everything after -c including the input and output filenames is being treated as PostScript.
Now a more recent version of Ghostscript would tell you that it needed an output filename, your incredibly ancient crufty version can only tell you that the device didn't open (because there was no output filename) which is why you get the misleading message.
Don't use -c twice, everything after -c (until -f) is treated as PostScript so you don't need to specify it twice.
I would expect this to work but since you are using so old a version I cannot be certain:
gs \
-dNOPAUSE \
-dBATCH \
-sDEVICE=pdfwrite \
-dDEVICEWIDTHPOINTS=433 \
-dDEVICEHEIGHTPOINTS=343 \
-dFIXEDMEDIA \
-c "0 6785 translate \
0 0 433 343 rectclip" -f \
-sOutputFile=testout.pdf \
testin.pdf

Internal cmake error while building trilinos on ubuntu 32bit

I'm trying to build the library trilinos on a 32bit ubuntu virtual machine. I wrote the following configuration script:
cmake \
-D CMAKE_INSTALL_PREFIX:FILEPATH=./ \
-D Trilinos_ENABLE_ALL_OPTIONAL_PACKAGES:BOOL=OFF \
-D Trilinos_ENABLE_Anasazi:BOOL=ON \
-D Trilinos_ENABLE_Epetra:BOOL=ON \
-D Trilinos_ENABLE_EpetraEXt:BOOL=ON \
-D Trilinos_ENABLE_Triutils:BOOL=ON \
-D Trilinos_ENABLE_Belos:BOOL=ON \
-D Trilinos_ENABLE_Ifpack:BOOL=ON \
-D Trilinos_ENABLE_TESTS:BOOL=ON \
-D TPL_BLAS_LIBRARIES=/usr/lib/libblas.so.3 \
-D TPL_LAPACK_LIBRARIES=/usr/lib/liblapack.so.3 \
-D CMACKE_VERBOSE_MAKEFILE:BOOL=ON \
-D Trilinos_ENABLE_DEBUG:BOOL=ON \
-D CMACK_BUILD_TYPE:STRING=DEBUG \
-D Trilinos_ENABLE_EXPLICIT_INSTANTIATION:BOOL=ON \
../
When I execute it with the ksh command in the terminal, I get the following error:
CMake Error: CMAKE_Fortran_Compiler not set, after EnableLanguage
It appears you do not have a Fortran compiler installed. This is why cmake cannot set CMAKE_Fortran_Compiler on its own, and requests you to manually specify one.
Since you are using Ubuntu, I would recommend using gfortran from the GCC suite. If you install the compiler from the repository, cmake should be fine.
You can install the compiler using
sudo apt-get install gfortran

Command Line Tool to Disable PDF Printing

Does anyone know of a "FREE" command line tool that can lock a pdf from a user being able to print it. I need to be able to put this in a batch to loop through a folder and disable printing from adobe standard and reader. Is this possible to do it from command line with any tool?
First, pdftk:
You can use pdftk for (available for Linux, Unix, Mac OS X and Windows) to set an "owner password":
pdftk \
input.pdf \
output semi-protected.pdf \
owner_pw "supersecret"
Result is this, for example:
pdfinfo semi-protected.pdf | grep Encrypted:
Encrypted: yes (print:no copy:no change:no addNotes:no)
You can modify the command to additionally require a user password to open the PDF:
pdftk \
input.pdf \
output semi-semi-protected.pdf \
owner_pw "supers3cr3t" \
user_pw "s3cr3t"
You can modify the command to (selectively) "allow" other user actions:
pdftk \
input.pdf \
output semi-semi-protected.pdf \
owner_pw "supers3cr3t" \
allow ModifyContents \
allow CopyContents \
allow ScreenReaders \
allow ModifyAnnotations
Result may be this, for example:
pdfinfo semi-semi-protected.pdf | grep Encrypted:
Encrypted: yes (print:no copy:yes change:yes addNotes:yes)
Second, podofoencrypt:
Commandline example:
podofoencrypt \
--rc4v2 \
-o "supers3cr3t" \
-u "s3cr3t" \
--edit \
--copy \
--editnotes \
--fillandsign \
--accessible \
--assemble \
input.pdf \
semi-protected.pdf
Big, fat caveat:
You should be aware, that this way of 'protecting' PDF files is by no means super-secure. There are quite a lot of PDF cracker software utilities out there which easily un-protect your PDF files. This method is only a very basic means to prevent most noobie computer users to mess with your files.
In addition, see also
Third, qpdf:
in Martin Schröder's answer!
qpdf can do this:
qpdf \
--encrypt \
"user-password" \
"owner-password" \
40 \
--print=n \
-- \
infilename \
outfilename
or even
qpdf \
--encrypt \
"user-password" \
"owner-password" \
128 \
--print=non \
--accessiblity=y \
--force-V4 \
--modify=form \
-- \
infilename \
outfilename

Resources