./configure step in Installing qt - c++

I am trying to install Qt on my Ubuntu Linux for using its libraries in reading XML files. I downloaded it from Qt Submodules and started to install step by step according the instruction in the Qt for Linux/X11 - Building from Source web page.
Things when well until I issued ./configure at the step 3. Then this error is appeared:
bash: ./configure: No such file or directory
These are my code lines:
cd /tmp
gunzip qt-everywhere-opensource-src-%VERSION%.tar.gz # uncompress the archive
tar xvf qt-everywhere-opensource-src-%VERSION%.tar # unpack it
cd /tmp/qt-everywhere-opensource-src-%VERSION%
./configure
I am confused that what should I do? I can not find configure...
Thanks in advance for your helpful answers.

From the official website:
If you download a Zip source package, you will need to convert Windows-style line endings (CR/LF) to Unix-style line-endings (LF) when you uncompress the package. To do this, give the "-a" option when you run the "unzip' command.If you fail to supply the "-a" option when unzipping the package, you will see the following error message when you attempt to execute the configure command: "bash: ./configure: /bin/sh^M: bad interpreter: No such file or directory"
So be sure to supply the -a option when uzipping
Take a look at this link: http://www.stackoverflow.com/questions/2920416/configure-bin-shm-bad-interpreter

For those who came into this question with same answer, but for Qt5..
From the official website:
If you download a Zip source package, you will need to convert
Windows-style line endings (CR/LF) to Unix-style line-endings (LF)
when you uncompress the package. To do this, give the "-a" option when
you run the "unzip' command.If you fail to supply the "-a" option when
unzipping the package, you will see the following error message when
you attempt to execute the configure command: "bash: ./configure:
/bin/sh^M: bad interpreter: No such file or directory"
So be sure to supply the -a option when uzipping Take a look at this
link:
http://www.stackoverflow.com/questions/2920416/configure-bin-shm-bad-interpreter
This answer does not work anymore, becouse all files in zip archive are tagged as binary (even configure text files). Only way to make it work is download xxx.tar.xz file, and open it by tar -xf xxx.tar.xz. If TAR.XZ file is not recognized, use -J parameter (tar -xJf xxx.tar.xz).

Related

Unable to unzip .zip file on linux machine

I have a large ~10GB zip file that was created using the standard Windows method (right click, select "send to compressed (zipped) folder"). I am able to unzip it just file on my Macbook.
I'm trying to unzip it on an EC2 machine. I know the file is a zip file because when I run file file.zip it says:
file.zip: Zip archive data, at least v2.0 to extract
Running unzip returns the following error:
Archive: file.zip
warning [file.zip]: 3082769992 extra bytes at beginning or within zipfile
(attempting to process anyway)
error [file.zip]: start of central directory not found;
zipfile corrupt.
(please check that you have transferred or created the zipfile in the
appropriate BINARY mode and that you have compiled UnZip properly)
Running tar xvf file.zip returns the following:
tar: This does not look like a tar archive
tar: Skipping to next header
tar: Archive contains `<{\204\027\333"D\344\210\321o\331' where numeric off_t value expected
tar: Archive contains `S\354\202},F\3546\276[\265\273' where numeric time_t value expected
tar: Archive contains ``3c\254\372$:e' where numeric uid_t value expected
tar: Archive contains `\265\306\025+ÜĞL\352' where numeric gid_t value expected
...etc
Does anyone know what might be going wrong?
Actually, 7-zip should makes this well, you can install it by:
sudo apt-get install p7zip-full
Then, you can extract your zip file as follows:
7z e file.zip
If your zip archive has 88,000 files and you are dealing with ~10Gig of content, you will need an unzip program that supports the zip64 extension.
You can check if your unzip program supports zip64 like this
$ unzip -v | grep -i zip64
ZIP64_SUPPORT (archives using Zip64 for large files supported)
If it doesn't have ZIP64_SUPPORT, you are out of luck. I suspect your unzip doesn't support zip64.
Alternatives are to get a version of unzip that does support zip64 or use an alternative program, like z-zip.
Your Entire File did not zip most probably and you prematurely moved it. At Least that was the issue with me.
I was unable to install 7z on my machine due to no sudo access, but I managed to repair the archive using
zip -FF archive.zip --out archive_repaired.zip -fz
and unzip worked on the repaired archive.
I found the solution via this github issue

Running Clang-query on objective-c files that import Foundation

I am trying to use clang-query to run matches against obj-c files that import Foundation but its not working, After building clang-query by moving it to the tools/extra folder, I run it using this command:
./clang-query MyClass.m -- -extra-arg-before "-isysroot/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk"
But I'm getting this error:
fatal error: 'stdarg.h' file not found
#include <stdarg.h>
How should I be running clang-query to analyse my objective-c sources?
After doing more research I found out that the right approach is to use libTooling based tools. As stated in their documentation:
Clang Tooling needs a compilation database to figure out specific build options for each file. Currently it can create a compilation database from the compile_commands.json file
For Xcode projects, this file can be generated like this:
xcodebuild -project PROJECT_NAME.xcodeproj | xcpretty -r json-compilation-database --output compile_commands.json
you will need to install the xcpretty gem. (gem install xcpretty)
Source: https://clang.llvm.org/docs/HowToSetupToolingForLLVM.html
UPDATE:
IF like me, you are having issues with the compile_commands.json file generated from xcodebuild logs, just pass this commands to your binary:
-mios-simulator-version-min=10.0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk -isystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/10.00/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1 -I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/include -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/Frameworks
You might need to update some of the parameters based on your system configuration but this is working fine for me currently.

Inkscape is not recognised as an internal or external command

I am trying to run Inkscape from command prompt however the error occurs. I have added c:/Program Files/ Inkscape/inkscape.com in the PATH but this not working.
Inkscape is not recognised as an internal or external command
I just had this same issue. However my problem was that I didn't add inkscape to the path. Try leaving the inkscape.com off your path and just have it as
C:\Program Files\Inkscape
This worked for me.
I know it is a bit old question but I faced the similar issue so I would like to share how I approach the issue because using Inkscape's command line might be quite useful for various reasons.
Option 1: You might either change the current directory as
cd C:\Program Files\Inkscape\
inkscape
Example scenario can be converting the .svg file to the .pdf which is useful for LaTeX import. To use it for exporting to PDF through Inkscape's command line (assuming that your file is already located in C:\temp\):
inkscape -D -z --file=C:\temp\logo.svg --export-pdf=C:\temp\logo.pdf --export-latex
Option 2 (Cleaner solution): Or you might add
C:\Program Files\Inkscape\
to the PATH environment variable. In Windows see this link. Then you can run inkscape without changing the current directory.
cd C:\temp
inkscape -D -z --file=logo.svg --export-pdf=logo.pdf --export-latex

Building log4cxx with APR

I need to build the log4cxx library on a SuSE linux system where I am not root. The package manager, zypper, apparently does not know about log4cxx.
I download log4cxx and try to build with autotools
./configure
checking for APR... no
configure: error: APR could not be located. Please use the --with-apr option.
I then search for libapr:
find / -name libapr*
/usr/share/doc/packages/libapr-util1
/usr/share/doc/packages/libapr1
/usr/lib64/libaprutil-1.so.0.3.12
/usr/lib64/libapr-1.so.0.4.5
/usr/lib64/libaprutil-1.so.0
/usr/lib64/libapr-1.so.0
So I try
./configure --with-apr=/usr/lib64/libapr-1.so.0
configure: error: the --with-apr parameter is incorrect. It must specify an install prefix, a build directory, or an apr-config file.
The same for --with-apr=/usr/lib64/libapr-1.so.0.4.5 and --with-apr=/usr/lib64/.
Which file does ./configure look for? What does --with-apr expect? Is one of the two *.so.* files the needed library?
You'll probably want to install libapr1-devel so that you can compile against it. Then try re-running ./configure.
I ran into the same issue, I think you're using the source code off of appache's site which I beleive is outdated. This issue has been fixed in the SVN trunk several years ago (lolol, I guess right around the time this question was asked).
Just pull the svn trunk's source and compile it:
svn checkout http://svn.apache.org/repos/asf/incubator/log4cxx/trunk apache-log4cxx
./autogen.sh
./configure
make
make check
sudo make install
On software.opensuse.org someone has packages built for recent versions of openSUSE as well as SLE at liblog4cxx10. Maybe that'll work for you instead of building your own.
MichaelGoren is right.
There is multiple ".h" file missing.
So you have to add them before launching make.
sed -i '1i#include <string.h>\n' src/main/cpp/inputstreamreader.cpp
sed -i '1i#include <string.h>\n' src/main/cpp/socketoutputstream.cpp
sed -i '1i#include <string.h>\n' src/examples/cpp/console.cpp
sed -i '1i#include <stdio.h>\n' src/examples/cpp/console.cpp
I bumped into the same problem on 3.3.4-5.fc17.x86_64 and resolved it by including the appropriate H files to the CPP files reported by the make utility.
In my case I should run the make utility 3 times each time getting a new error and fixing it by adding the appropriate include H to the reported CPP file.
The main idea is as following:
1) Check by running the man utility, where the function mentioned in the error defined.
For example, man memmove says that it is defined in the string.h header file.
2) Add the appropriate include file to the CPP file.
For example, the make utility complains that inputstreamreader.cpp does not find the memmove function. Open the inputstreamreader.cpp file and add string.h to its header files.
3) Run the make utility until the log4cxx is compiled without errors.

CSSTidy is driving me crazy!

I am on OS X + Python 2.6 + django 1.1.
I have tried all possible solution available on the net i.e.
http://thingsilearned.com/2009/01/02/installing-csstidy-and-scons-on-os-x-or-linux/
tried with python 2.5, 2.4 apple-python.. I just can't go past this error after installing scons
$ /usr/local/bin/scons
scons: *** No SConstruct file found.
File "/Library/Python/2.5/site-packages/SCons/Script/Main.py", line 829, in _main
I need csstidy for django-compress (yes I can turn that function off but why?) I mean the maintainer must see some value to have it in default and he knows better.
Unfortunately there is no port for csstidy...
Don't know if you managed to give up or not, or if you solved it.
For anybody who is still having trouble building CSSTidy, here was my solution. If you follow the tutorial in the URL linked above, there is one horrible error in it that I didn't realize until about an hour later.
$ wget http://downloads.sourceforge.net/csstidy/csstidy-source-1.4.zip?modtime=1184828155&big_mirror=0
$ unzip csstidy-source-1.4.zip
$ cd csstidy <<-- THIS IS WRONG. SConstruct isn't here. D:
$ scons
$ sudo cp release/csstidy/csstidy /usr/local/bin/
The errors the author ran into had nothing to do with the --standard-lib flag. When you unzip, the files don't get put into a subdirectory like tar usually does. So the SConstruct file that's magically missing is actually in the directory above csstidy, wherever you ran unzip in the first place.
Once I found that out, I saw the SConstruct file and was able to build it by running scons.
If you just want to build csstidy and don't care about incremental builds, just do this:
g++ *.cpp -o csstidy