My environment:
QT: Qt_5_0_2
QWT: qwt-6.1-rc3
MinGW: mingw47_32
OS: win7_32
I follow the introduction file "INSTALL"'s step:
C) Win32/MinGW
Check that your Qt version has been built with MinGW - not with MSVC !
Start a Shell, where Qt4 is initialized. ( F.e. with
"Programs->Qt by Trolltech ...->Qt 4.x.x Command Prompt" ).
Check if you can execute "make" or something like "mingw32-make".
qmake qwt.pro
make
make install
I get the error in the step "make":
C:\qwt-6.1-rc3>qmake qwt.pro
C:\qwt-6.1-rc3>mingw32-make
cd src\ && ( if not exist Makefile E:\Qt\5.0.2\5.0.2\mingw47_32\bin\qmake.exe C:
\qwt-6.1-rc3\src\src.pro -o Makefile ) && mingw32-make -f Makefile
mingw32-make[1]: Entering directory 'C:/qwt-6.1-rc3/src'
mingw32-make -f Makefile.Release all
mingw32-make[2]: Entering directory 'C:/qwt-6.1-rc3/src'
Makefile.Release:305: *** missing separator. Stop.
mingw32-make[2]: Leaving directory 'C:/qwt-6.1-rc3/src'
Makefile:40: recipe for target 'release-all' failed
mingw32-make[1]: *** [release-all] Error 2
mingw32-make[1]: Leaving directory 'C:/qwt-6.1-rc3/src'
makefile:44: recipe for target 'sub-src-make_first-ordered' failed
mingw32-make: *** [sub-src-make_first-ordered] Error 2
The lines 304,305 in "Makefile.Release" are:
304 qmake: FORCE
305 #$(QMAKE) -o Makefile.Release src.pro
Where is wrong?
thanks
Makefile.Release:305: *** missing separator. Stop.
This usually means this Makefile is not of the right format for mingw32-make;
Since the Makefile is generated by qmake, you should check the QMAKESPEC of your qmake. It should be win32-g++, not win32-mvsc.
This issue is strongly linked to the first warning of the qwt INSTALL note :
Check that your Qt version has been built with MinGW - not with MSVC !
Guess your broken Makefile is leftover from some earlier attempts - remove the Qwt build directory completely and start from scratch.
For loading the Qwt designer plugin in the Qt creator you need to have a version that is compatible with how the creator had been built. AFAIR the 5.0.2 mingw package contains a version 2.7.0 of the creator, that had been built for Qt 4.8 with MSVC ( see About->Qt creator ). If true it means you need to have 2 different builds of Qwt - one for your application, the other one for the designer plugin.
For the future I'm planning to offer precompiled versions of the designer plugin that are compatible with current binary packages of the Qt creator.
Also note that in SVN trunk the default settings for building the plugin have been changed since rc3: on windows the library is statically linked into the plugin and on better systems you have a similar effect with compiling in the install path of the library ( see RPATH ).
I had the same problem. The reason was that I wanted to prepare sources second time. I had sources in svn floder. I solved proble erasing folder and update sources again. After this operation I was able to run 'qmake proj.pro' correctly.
Related
I'm trying to build ORB_SLAM2 on macOS 11.4 with clang 12 and OpenCV4 and have run into this error:
make[2]: *** No rule to make target `/usr/lib/libz.dylib', needed by `../lib/libORB_SLAM2.dylib'. Stop.
This file does not exist on my Mac and I cannot add this symlink due to macOS's SIP. The correct path should be /usr/local/opt/zlib/lib/libz.dylib
How can I fix this /usr/lib/libz.dylib reference?
Here is my branch with my macOS build changes.
I've tried to fix the problem by:
Inspecting each of the project's direct dependencies with otool -L and rebuilt from source where necessary (such as OpenCV) to make sure /usr/lib/libz.dylib is not referenced (fix suggested here)
Using CMake's FindZLIB.cmake module in the ORB_SLAM2 CMakeLists.txt to ensure the correct ZLIB is found
Below is the output showing ZLIB is found but still no luck:
-- Found ZLIB: /usr/local/opt/zlib/lib/libz.dylib (found version "1.2.11")
Solved: I checked the CMakeFiles/Makefile.cmake and it showed me that the Pangolin library I was using was actually one from another project of mine. Building Pangolin in this project solved the issue.
Whilst attempting to make/compile the grafic package, I'm seeing this error after calling the make command within the grafic directory:
f77 -O2 -c grafic1.f
make: f77: No such file or directory
make: *** [grafic1.o] Error 1
I have XCode and all associated command line tools installed, what could be causing this error?
This error is make telling you that you have no binary in your path called f77. There are two things you need to look at the fix this:
Do you have a Fortran compiler installed? MacOS X/Xcode does not come pre-installed with one by default. The easiest options to install one are via third-party tools like macports or homebrew where you can install gfortran which may be a standalone package or may be part of the gcc package.
Once you have a compiler installed, your makefile needs to know about it. Without seeing the makefile this is only an assumption, but if autotools are not used the fortran compiler is usually hardcoded in a variable called FC, e.g. you might see a line
FC=f77
and you would change this to
FC=gfortran
assuming gfortran is in your path.
Once you have a Fortran compiler installed and the makefile knows about it, you should be able to execute make successfully.
I am installing glfw forcodeblocks, when I try to execute the makefile through command prompt in order to compil glfw using this command:mingw32-make win32-mingw I get the following error mingw32 make: ***no rule to make target 'win32'. stop.
I am running a 64 bit version of windows 8
Edit:
For newer versions of glfw you can not use compile.bat or command mingw32-make win32-mingw
You must use CMake to create makefiles under the source folder e.g. build folder.
Then you can run mingw32-make .
For older versions :
Try it with the command described on the glfw side.
Unzip the archive anywhere you like (I will assume C:\glfw for simplicity).
Compile:
For Windows users, there is a batch file which allows to compile using a variety of compilers.
Open a DOS window, cd to the directory where GLFW lives (e.g. C:\glfw), and type
compile make mgw
Building the Libraries
As you can see there is a compile.bat
Of course you have to cd to your source folder. From an folder outside the source a compile.bat will not work.
if in your source there is no compile download it here.
glfw-2.5.zip
While building ARM toolchain , I got the following error
checking for suffix of object files... configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.
make[1]: *** [configure-target-libgcc] Error 1
make[1]: Leaving directory `<path>/gcc-4.3.2-arm-elf'
make: *** [all] Error 2
what might be the problem?
Did you read http://gcc.gnu.org/wiki/FAQ#configure_suffix ?
Have you installed GMP, MPFR and MPC? Are they in your library search path?
See http://gcc.gnu.org/wiki/InstallingGCC and make sure you've followed the basic instructions. By far the simplest way to build GCC (including as a cross compiler) is to follow these instructions:
Alternatively, after extracting the GCC source archive, simply run the ./contrib/download_prerequisites script in the GCC source directory. That will download the support libraries and create symlinks, causing them to be built automatically as part of the GCC build process.
"*Building GCC is not trivial, but is not difficult if you follow the instructions carefully.
Many people rush into trying to build it without reading the installation docs properly and make one or more of these common mistakes:
1) do not run ./configure from gcc src dir (this is not supported) => you need to run configure from outside the gcc source directory
2) Note: if GCC links dynamically to the prerequisite libs (GMP/MPFR/MPC) then the shared libraries must be in the dynamic linker's path (LD_LIBRARY_PATH), both when building gcc and when using the installed compiler.*"
Simple example (without dynamic link to GMP/MPFR/MPC):
tar xzf gcc-4.8.0.tar.gz
cd gcc-4.8.0
./contrib/download_prerequisites
cd ..
mkdir objdir
cd objdir
$PWD/../gcc-4.8.0/configure --prefix=/opt/gcc-4.8.0
make
make install
Sources:
Advogato Doc -
GNU Doc
export LD_LIBRARY_PATH=/path/for/libraries:$LD_LIBRARY_PATH
path/for/libraries is where the GMP MPFR and MPC libraries are present.
I was compiling GCC on ubuntu 12.04 and these linraries present in the path /usr/local/lib
I want to build "gcc cross-compiler" to compile "c/c++" applications on "Linux" environment but for "Windows" target.
I have made this so far:
Installed the necessary tools and packages for building GCC listed on "Prerequisites for GCC" page.
Downloaded required sources:
"gcc-core-4.4.1", "gcc-g++-4.4.1", "binutils-2.19.1", "w32api-3.13-mingw32", "mingwrt-3.16-mingw32"
Created this directory hierarchy:
"${HOME}/gcc/" - for final cross-compiler
"${HOME}/src/" - for sources
"${HOME}/src/build-binutils/i386-mingw32/" - for building binutils to "i386-mingw32" target
"${HOME}/src/build-gcc/i386-mingw32/" - for building gcc to "i386-mingw32" target
Builded binutils package:
cd "${HOME}/src/build-binutils/i386-mingw32/"
../../binutils-2.19.1/configure --prefix="${HOME}/gcc" --target=i386-mingw32 --disable-nls
make
make install
Copied "w32api" and "mingwrt" headers to the install directory:
cp -R "${HOME}/src/w32api-3.13-mingw32/include" "${HOME}/gcc/i386-mingw32"
cp -R "${HOME}/src/mingwrt-3.16-mingw32/include" "${HOME}/gcc/i386-mingw32"
And now when I am trying to build the "c (only) cross-compiler":
cd "${HOME}/src/build-gcc/i386-mingw32/"
../../gcc-4.4.1/configure --prefix="${HOME}/gcc" --target=i386-mingw32 --enable-languages=c --with-headers="${HOME}/gcc/i386-mingw32/include" --disable-nls
make<br>
it was building something about 4 minutes and then gives me these errors:
${HOME}/gcc/i386-mingw32/bin/ld: dllcrt2.o: No such file: No such file or directory
collect2: ld returned 1 exit status
make[2]: *** [libgcc_s.dll] Error 1
make[2]: Leaving directory `${HOME}/src/build-gcc/i386-mingw32/i386-mingw32/libgcc'
make[1]: *** [all-target-libgcc] Error 2
make[1]: Leaving directory `${HOME}/src/build-gcc/i386-mingw32'
make: *** [all] Error 2
From that error message I really don't know what to do now :-((( .
Does anybody know where is the problem?
Thanks.
That's actually OK: the way things go, you need to
build binutils
install headers
build the a partial C compiler: enough to create object files, but not enough to link
build the win32api and mingw runtime (which includes your missing dllcrt2.o)
build a complete C compiler (and other front-ends, such as C++, Fortran, Ada, whatever, if you want them)
You have successful performed step 3 above; it fails building libgcc (which is a GCC support library), but that means the C compiler core is functionnal (although it won't be able to link, it can still create valid object files). You can check that by looking at the gcc/xgcc file in your GCC build directory.
So, you need to go to the next step, not worrying about your current failure.
(To actuall install the partial C compiler, you should run make with the -k option, to have it do it best, even in the face of errors. For example, use make -k install.)
There are precompiled cross-compilers of MinGW-w64 available.
This allows to compile native 32- and 64-bit Windows binaries from Linux, a two minute tutorial is available at http://www.blogcompiler.com/2010/07/11/compile-for-windows-on-linux/
Just in case you don't want to spend a lot of time trying to build it yourself.
I grepped through the MinGW sources, and found that dllcrt2.o is something built off the mingwrt package. I assume you have to compile and install that, not just copy the headers?