Error when installing Qwt 6.02 on OSX 10.8.3 - c++

After commands
qmake -spec macx-g++
make
make install
I'm getting
ld: library not found for -lqwt
collect2: ld returned 1 exit status
make[2]: *** [../../lib/qwtmathml.framework/qwtmathml] Error 1
make[1]: *** [sub-mathml-make_default] Error 2
make: *** [sub-textengines-make_default-ordered] Error 2
Any Idea what could be the problem?

Quick Answer: Edit qwtconfig.pri and comment out the second to the last line and rebuild:
QWT_CONFIG += QwtFramework // Comment this line out
Long Answer: Qwt on OS X trys to build itself as a Mac Framework by default. Besides the basic qwt library, there are a couple other internal items in the Qwt package that are also trying to build (examples, QwtMathML library). The QMake project file used by Qwt has a couple issues when it trys to build those final dependencies but it can't find the Qwt framework that it just built (if you look in lib directory, you should see that qwt.framework is actually built and there). The developer is aware of them but doesn't have an OS X machine on which try to fix them so he's dependent on someone submitting a fix.

Related

LimeReport compilation: Error 127. What causes this?

I am trying to compile LimeReport in Windows 10 using Qt 5.5.9 and Qt Creator 4.11.0. I get the following compilation output and the compilation stops.
/usr/bin/sh: I:\Programs\Qt\Qt5.9.9\5.9.9\mingw53_32\bin\lupdate.exe: command not found
Makefile.Debug:762: recipe for target 'ts' failed
mingw32-make[2]: *** [ts] Error 127
mingw32-make[2]: *** Waiting for unfinished jobs....
mingw32-make[2]: Leaving directory 'E:/Software/C-CPP Windows GUI Programming/Qt/Plugins + Libs/LimeReport/build-limereport-Desktop_Qt_5_9_9_MinGW_32bit-Debug/limereport'
Makefile:36: recipe for target 'debug' failed
mingw32-make[1]: Leaving directory 'E:/Software/C-CPP Windows GUI Programming/Qt/Plugins + Libs/LimeReport/build-limereport-Desktop_Qt_5_9_9_MinGW_32bit-Debug/limereport'
mingw32-make[1]: *** [debug] Error 2
Makefile:89: recipe for target 'sub-limereport-make_first-ordered' failed
mingw32-make: *** [sub-limereport-make_first-ordered] Error 2
11:20:35: The process "I:\Programs\Qt\Qt5.9.9\Tools\mingw530_32\bin\mingw32-make.exe" exited with code 2.
Error while building/deploying project limereport (kit: Desktop Qt 5.9.9 MinGW 32bit)
When executing step "Make"
lupdate.exe is very much present inside the directory "I:\Programs\Qt\Qt5.9.9\5.9.9\mingw53_32\bin". The directory is part of PATH variable, and typing "lupdate" in cmd works.
Please tell me what is the problem and if I am doing anything wrong.
Note: I downloaded the source code from the official GitHub page and the source code compiles correctly in Linux. The Qt installation inside my Windows compiles all other programs correctly without any problem.
You are using a version of make that invokes a POSIX shell (/bin/sh), not the Windows cmd.exe shell.
In POSIX, backslashes are always escape characters and directories are separated by forward slashes (/) not backslashes.
Somewhere in your makefile you have set a variable to the path I:\Programs\Qt\Qt5.9.9\5.9.9\mingw53_32\bin\lupdate.exe or some part of that: replace the backslashes with forward slashes.
In general, in makefiles you should always use forward slashes as directory separators.
Okay, I used to following workaround to fix this problem:
I could not find any line in make file or pro file that had a mention of I:\Programs\Qt\Qt5.9.9\5.9.9\mingw53_32\bin\lupdate.exe. So, instead inside the limereport/limereport/limereport.pro file, I disabled the ts.commands = $$LUPDATE \"$$PWD\" -noobsolete -ts $$TRANSLATIONS line and qm.commands += $$LRELEASE -removeidentical $$tsfile -qm $$qmfile $$escape_expand(\\n\\t) line and it compiled correctly. I did not want any other-language translations, so I don't care about disabling the above line. This is not a permanent fix but definitely a workaround.

Error using Cygwin: "collect2: fatal error: ld terminated with signal 11 [Segmentation fault]"

I'm trying to use cygwin to download openslide (building natively on Windows) on a Windows 10 x64 system. I ran into an error earlier relating to chk_fail and set the line in the build file with -D_FORTIFY_SOURCE to 0 instead of the default (2). You can probably tell by now I don't really know what I'm doing. But I got a new error below relating to a memory error from what I've read. I tried deleting the whole package folder including the makefiles and object files, then clone from Github again and rebuild, but it didn't work. Can anyone give me pointers about what's happening here and how to fix it? It would be much appreciated.
Scanning dependencies of target ziptool
[ 90%] Building C object src/CMakeFiles/ziptool.dir/ziptool.c.obj
[ 90%] Linking C executable ziptool.exe
collect2: fatal error: ld terminated with signal 11 [Segmentation fault], core dumped
compilation terminated.
make[2]: *** [src/CMakeFiles/ziptool.dir/build.make:109: src/ziptool.exe] Error 1
make[2]: *** Deleting file 'src/ziptool.exe'
make[1]: *** [CMakeFiles/Makefile2:442: src/CMakeFiles/ziptool.dir/all] Error 2
make: *** [Makefile:161: all] Error 2
Failed: make $parallel (line 417)
I solved this problem. Firstly, don't even bother to build this package using Cygwin. It won't work because of dependency issues and there is no record for version control in the package README.
For anyone else who has this problem like I did, you can download the latest versions of the code here: https://github.com/openslide/openslide-winbuild/releases and pick the latest one.
I first pip installed openslide-python. Then I moved openslide-win64-20171122 (from Github) into anaconda3/site-packages (not necessary, but nice), and then from anaconda3/site-packages/openslide I opened lowlevel.py.
In lowlevel.py, you need to add the following lines:
(in the beginning after importing libraries)
os.environ['PATH'] = "path/to/openslide-win64-20171122/bin" + ";" + os.environ['PATH']
You can also change this line:
if platform.system() == 'Windows':
_lib = cdll.LoadLibrary('libopenslide-0.dll')
to this:
if platform.system() == 'Windows':
_lib = cdll.LoadLibrary(util.find_library("libopenslide-0.dll"))
so that it searches for the libopenslide-0.dll file. Then don't forget to add from ctypes import util at the beginning.

Suggestions to compile the program fung-calc

Im trying to compile the program called fungcalc, its a graph software which the last version was made on 2003, it was designed to run in kde 3.5 (qt3).
Now the steps that I did was to install the qt3 libs, and the required componens missing based in the
./configure --disable-kde-app
this argument remove the support for kde (and the need for its libs too).
When compiling it stops almost at the end (since many .so where compiled but not the main executable)with the next output
/bin/ld: final link failed: nonrepresentable section on output
collect2: error: ld returned 1 exit status
make[4]: *** [Makefile:412: libfungcalc.la] Error 1
make[4]: Leaving directory '/fung-calc-1.3.2b/src/libfungcalc'
With the same error for the lines 277,337,495,505 of the Makefile.
So what suggestion could be so I can start to roam the entire code?
The entire Makefile is here
I don't know if this runs on 64 bits (but I suppose it does).

Building emulator for AOSP 4.2.2 with make -j4

I am trying to build emulator for Android open source project (AOSP) 4.2.2 and when I compile make -j4, I get the following error.
ost C: acp <= build/tools/acp/acp.c
host C: libhost <= build/libs/host/CopyFile.c
host C++: libandroidfw <= frameworks/base/libs/androidfw/AssetDir.cpp
host C++: libandroidfw <= frameworks/base/libs/androidfw/AssetManager.cpp
/var/folders/1v/7qwg76xn3fs34bpkbj7sw0k00000gq/T//ccmomvtt.s:1854:FATAL:Symbol _isSourceNewer.eh already defined.
/var/folders/1v/7qwg76xn3fs34bpkbj7sw0k00000gq/T//ccGfRe2w.s:829:FATAL:Symbol _process.eh already defined.
make: *** [out/host/darwin-x86/obj/STATIC_LIBRARIES/libhost_intermediates/CopyFile.o] Error 1
make: *** Waiting for unfinished jobs....
make: *** [out/host/darwin-x86/obj/EXECUTABLES/acp_intermediates/acp.o] Error 1
What is going wrong? I followed source website to build this. My system configuration: Mac OS 10.7.5
I finally figured out the what the problem is. I did couple of things to make this work.
Remove any previous version of Xcode on your machine running on
OS x 10.7.
Look for Developer/ folder in the home directory. Move that to trash (It belongs to Xcode)
Reinstall Xcode 4.2 (which I used and it worked)
Follow the AOSP documentation to update the rest using macports.

Qt resource system bug in qt 4.8.3

I'm using Qt 4.8.3 Open Source with Qt Creator 2.6.0 on Windows 8 Pro x64. The compiler I'm using is MingW 4.4.
I've an old project that I built using Qt 4.8.0. The project has a resource file named Resource.qrc. The project compiled fine in Qt 4.8.0 and I could access everything that I mentioned in the resource file.
But in Qt 4.8.3 I can't compile the same project. Qt 4.8.3 doesn't seem to be able to compile resource file. Here is the part of the output that tried to compile Resource.qrc file:
bin\rcc.exe -name Resource ..\Source\Resource.qrc -o release\qrc_Resource.cpp
mingw32-make[1]: Leaving directory `E:/Programs/Version Control/Sources/Spadetrump/Release'
process_begin: CreateProcess(NULL, bin\rcc.exe -name Resource ..\Source\Resource.qrc -o release\qrc_Resource.cpp, ...) failed.
make (e=2): The system cannot find the file specified.
mingw32-make[1]: *** [release/qrc_Resource.cpp] Error 2
mingw32-make: *** [release] Error 2
00:08:10: The process "C:\MingW\bin\mingw32-make.exe" exited with code 2.
Error while building/deploying project Spadetrump (target: Desktop)
When executing step 'Make'
It was a clean build. If I execute rcc.exe with the exact same arguments and with absolute path, qrc_Resource.cpp is generated.
I tried the above with a fresh new Qt GUI application and the result is same.
Any idea what's wrong with Qt 4.8.3?
Had the exact same issues as you with the same setup, expect for the windows version which is xp for me. The problem is that the rcc.exe cannot be found, because an incorrect path is used for that call.
There is a bugreport at qt-projects for this problem: https://bugreports.qt.io/browse/QTBUG-27237
The workarround proposed by Daniel Frömmel did the trick for me:
1) open the qmake.conf of your platform (for me its C:\Qt\4.8.3\mkspecs\win32-g++)
2) search for QMAKE_IDC
3) add the following line after the QMAKE_IDC line:
QMAKE_RCC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}rcc.exe
4) save file and clsoe
5) restart all your dev tools and remove all auto generated Makefiles
6) recompile