QGIS 2.4 compilation error on Redhat 6.2 - compilation

I try to compil QGIS 2.4 from scratch (aka source) on a Redhat 6.2 server (please don't ask me why...).
I have installed all the pre-requisites, applied the patch 0001-Fix-build-failure-with-gcc-4.4-bug-10762.patch (following this: https://hub.qgis.org/attachments/7755/0001-Fix-build-failure-with-gcc-4.4-bug-10762.patch) and configure QGis using the INSTALL file:
mkdir build-master
ccmake ..
<configure>
make
Unfortunatly, i have the following
$ make
[ 0%] Built target version
Linking CXX shared library ../../output/lib/libqgis_core.so
CMakeFiles/qgis_core.dir/qgsgml.cpp.o: In function `QgsGml::getFeatures(QString const&, QGis::WkbType*, QgsRectangle*, QString const&, QString const&)':
qgsgml.cpp:(.text+0x9d8): undefined reference to `XML_ParserCreateNS'
qgsgml.cpp:(.text+0x9f2): undefined reference to `XML_SetUserData'
qgsgml.cpp:(.text+0xa0f): undefined reference to `XML_SetElementHandler'
qgsgml.cpp:(.text+0xa25): undefined reference to `XML_SetCharacterDataHandler'
qgsgml.cpp:(.text+0x11fd): undefined reference to `XML_Parse'
qgsgml.cpp:(.text+0x1216): undefined reference to `XML_GetErrorCode'
qgsgml.cpp:(.text+0x1251): undefined reference to `XML_GetCurrentColumnNumber'
qgsgml.cpp:(.text+0x128c): undefined reference to `XML_GetCurrentLineNumber'
qgsgml.cpp:(.text+0x12c5): undefined reference to `XML_ErrorString'
qgsgml.cpp:(.text+0x179a): undefined reference to `XML_ParserFree'
CMakeFiles/qgis_core.dir/qgsgml.cpp.o: In function `QgsGml::getFeatures(QByteArray const&, QGis::WkbType*, QgsRectangle*)':
qgsgml.cpp:(.text+0x18ac): undefined reference to `XML_ParserCreateNS'
qgsgml.cpp:(.text+0x18c3): undefined reference to `XML_SetUserData'
qgsgml.cpp:(.text+0x18e0): undefined reference to `XML_SetElementHandler'
qgsgml.cpp:(.text+0x18f6): undefined reference to `XML_SetCharacterDataHandler'
qgsgml.cpp:(.text+0x1932): undefined reference to `XML_Parse'
CMakeFiles/qgis_core.dir/qgsgmlschema.cpp.o: In function `QgsGmlSchema::guessSchema(QByteArray const&)':
qgsgmlschema.cpp:(.text+0x3452): undefined reference to `XML_ParserCreateNS'
qgsgmlschema.cpp:(.text+0x346c): undefined reference to `XML_SetUserData'
qgsgmlschema.cpp:(.text+0x3489): undefined reference to `XML_SetElementHandler'
qgsgmlschema.cpp:(.text+0x349f): undefined reference to `XML_SetCharacterDataHandler'
qgsgmlschema.cpp:(.text+0x34e1): undefined reference to `XML_Parse'
qgsgmlschema.cpp:(.text+0x34fa): undefined reference to `XML_GetErrorCode'
qgsgmlschema.cpp:(.text+0x3501): undefined reference to `XML_ErrorString'
collect2: ld returned 1 exit status
make[2]: *** [output/lib/libqgis_core.so.2.4.0] Error 1
make[1]: *** [src/core/CMakeFiles/qgis_core.dir/all] Error 2
make: *** [all] Error 2
Looks like it did not found the Expat lib insatlled in /usr/local:
$ ll /usr/local/include/expat*
-rw-r--r--. 1 root root 3364 Jun 15 10:21 /usr/local/include/expat_external.h
-rw-r--r--. 1 root root 41752 Jun 15 10:21 /usr/local/include/expat.h
$ ll /usr/local/lib/libexpat.*
-rw-r--r--. 1 root root 711896 Jun 15 10:21 /usr/local/lib/libexpat.a
-rwxr-xr-x. 1 root root 942 Jun 15 10:21 /usr/local/lib/libexpat.la
lrwxrwxrwx. 1 root root 17 Jun 15 10:21 /usr/local/lib/libexpat.so -> libexpat.so.1.6.0
lrwxrwxrwx. 1 root root 17 Jun 15 10:21 /usr/local/lib/libexpat.so.1 -> libexpat.so.1.6.0
-rwxr-xr-x. 1 root root 440095 Jun 15 10:21 /usr/local/lib/libexpat.so.1.6.0
Any idea ?
Thanks in advance.

Found a work arround.
The expat lib is not included during the compil.
cd build-master
find src/ -name link.txt | xargs -0 sed -i '' -e 's/\-lsqlite3/\-lsqlite3\ \-lexpat/g'
make

Related

I failed to install Font Awesome in Laravel 8 app

I want to add Font Awesome in my Laravel 8/Tailwind CSS 2.0.1 application, and after searching, I install it the following way.
npm install font-awesome --save
Then I add the line in the file /mnt/_work_sdb8/wwwroot/lar/Hostels4/resources/css/app.css
#import 'tailwindcss/base';
#import 'tailwindcss/components';
#import 'tailwindcss/utilities';
#import "node_modules/font-awesome/scss/font-awesome.scss";
I get an error.
ERROR in ./resources/css/app.css Module build failed (from
./node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleBuildError: Module build failed (from ./node_modules/postcss-loader/dist/cjs.js):
Error: Failed to find 'node_modules/font-awesome/scss/font-awesome.scss'
But I found the referenced file in...
node_modules/font-awesome/scss$ ls -la
total 105
drwxrwxrwx 1 root root 4096 May 21 14:12 .
drwxrwxrwx 1 root root 4096 May 21 14:12 ..
-rwxrwxrwx 1 root root 715 Oct 25 2016 _animated.scss
-rwxrwxrwx 1 root root 592 Oct 25 2016 _bordered-pulled.scss
-rwxrwxrwx 1 root root 459 Oct 25 2016 _core.scss
-rwxrwxrwx 1 root root 120 Oct 25 2016 _fixed-width.scss
-rwxrwxrwx 1 root root 430 Oct 25 2016 font-awesome.scss
-rwxrwxrwx 1 root root 50498 Oct 25 2016 _icons.scss
-rwxrwxrwx 1 root root 375 Oct 25 2016 _larger.scss
-rwxrwxrwx 1 root root 378 Oct 25 2016 _list.scss
-rwxrwxrwx 1 root root 1637 Oct 25 2016 _mixins.scss
-rwxrwxrwx 1 root root 783 Oct 25 2016 _path.scss
-rwxrwxrwx 1 root root 672 Oct 25 2016 _rotated-flipped.scss
-rwxrwxrwx 1 root root 134 Oct 25 2016 _screen-reader.scss
-rwxrwxrwx 1 root root 482 Oct 25 2016 _stacked.scss
-rwxrwxrwx 1 root root 22644 Oct 25 2016 _variables.scss
And in webpack.mix.js file resources/css/app.css is included by install:
const mix = require('laravel-mix');
mix.js('resources/js/app.js', 'public/js')
.postCss('resources/css/app.css', 'public/css', [
require('postcss-import'),
require('tailwindcss'),
]);
if (mix.inProduction()) {
mix.version();
}
$ node -v
v14.16.0
$ npm -v
7.14.0
$ php artisan --version
Laravel Framework 8.42.1
What is wrong, and how can it be fixed?
MODIFIED :
I found referenced dir with files :
/node_modules/font-awesome/css$ ls -la
total 100
drwxrwxrwx 1 root root 0 May 21 14:12 .
drwxrwxrwx 1 root root 4096 May 21 14:12 ..
-rwxrwxrwx 1 root root 37414 Oct 25 2016 font-awesome.css
-rwxrwxrwx 1 root root 21778 Oct 25 2016 font-awesome.css.map
-rwxrwxrwx 1 root root 31000 Oct 25 2016 font-awesome.min.css
But modifying file resources/css/app.css:
#import "node_modules/font-awesome/css/font-awesome.css";
I still see error :
ERROR in ./resources/css/app.css Module build failed (from
./node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleBuildError: Module build failed (from ./node_modules/postcss-loader/dist/cjs.js):
Error: Failed to find 'node_modules/font-awesome/css/font-awesome.css'
It seems that I set the path/filename correctly, but why the error?
Since Laravel 8 now uses PostCSS you will likely want to ditch SASS and use CSS. The following is the proper way to do that.
First, install the latest free version of Font Awesome.
npm install -D #fortawesome/fontawesome-free
Add one or more of the Font Awesome CSS libraries.
app.css
#import '~#fortawesome/fontawesome-free/css/fontawesome';
#import '~#fortawesome/fontawesome-free/css/regular';
#import '~#fortawesome/fontawesome-free/css/solid';
#import '~#fortawesome/fontawesome-free/css/brands';
Then run...
npm run prod
Please reference this document.
I found decision for free version:
Install with command
npm install --save #fortawesome/fontawesome-freeI
In app.js added
require('#fortawesome/fontawesome-free/js/all.min.js');
line
With this https://fontawesome.com/icons?d=gallery&p=2&m=free acessible icons
This is what I do for font-awsome after installing it using
npm install --save #fortawesome/fontawesome-free (see https://fontawesome.com/how-to-use/on-the-web/setup/using-package-managers )
inside my resources/sass/app.scss
#import '~#fortawesome/fontawesome-free/scss/fontawesome';
#import '~#fortawesome/fontawesome-free/scss/regular';
#import '~#fortawesome/fontawesome-free/scss/solid';
#import '~#fortawesome/fontawesome-free/scss/brands';
then runing npm-run dev should make it work
In your case removing the .scss in the import might already do the trick
You can use this
#import '~font-awesome/css/font-awesome.css';.

Permission Denied error in Xcode 10 preventing Build...Command PhaseScriptExecution failed with a nonzero exit code

I'm unable to Build/Archive my project due to an error:
Permission denied
Command PhaseScriptExecution failed with a nonzero exit code
I have tried correcting keychain login as advised by other answers, but it hasn't worked. Please could someone help? Most likely a rookie mistake but means I cannot even simulate my app.
Further details on the error:
PhaseScriptExecution Copy\ Pods\ Resources
/Users/james/Library/Developer/Xcode/DerivedData/trials-fseuxkwjlleukxdxyfgdrujhdwuy/Build/Intermediates.noindex/trials.build/Debug-iphonesimulator/trials.build/Script-8DEE2FC97BFA0D6E636019C4.sh (in target: trials)
cd /Users/james/pCloud\ Drive/3.\ NeuroRecovery\ Ltd/4.\ Products/3.\ NIHR\ Trial\ NHS/v1.0\ -\ Initial\ App/1.\ App\ Delivery/3.\ Source\ Code/1.\ iOS/trials
/bin/sh -c /Users/james/Library/Developer/Xcode/DerivedData/trials-fseuxkwjlleukxdxyfgdrujhdwuy/Build/Intermediates.noindex/trials.build/Debug-iphonesimulator/trials.build/Script-8DEE2FC97BFA0D6E636019C4.sh
/Users/james/Library/Developer/Xcode/DerivedData/trials-fseuxkwjlleukxdxyfgdrujhdwuy/Build/Intermediates.noindex/trials.build/Debug-iphonesimulator/trials.build/Script-8DEE2FC97BFA0D6E636019C4.sh: line 2: /Users/james/pCloud Drive/3. NeuroRecovery Ltd/4. Products/3. NIHR Trial NHS/v1.0 - Initial App/1. App Delivery/3. Source Code/1. iOS/trials/Pods/Target Support Files/Pods-trials/Pods-trials-resources.sh: Permission denied
Command PhaseScriptExecution failed with a nonzero exit code
Edit 17th Dec:
thank you #geno-chen & #fantini I have checked & can report the following:
Did you install Cocoapods with sudo: Yes.
I checked the permissions of the files using ls -lh and had the following:
-rw-r--r-- 1 james staff 159B 25 Mar 2015 Podfile
-rw-r--r-- 1 james staff 1.2K 25 Mar 2015 Podfile.lock
drwxr-xr-x 11 james staff 352B 17 Dec 14:03 Pods
drwxr-xr-x 52 james staff 1.6K 17 Dec 14:03 trials
drwxr-xr-x# 5 james staff 160B 17 Dec 14:03 trials.xcodeproj
drwxr-xr-x# 5 james staff 160B 17 Dec 14:03 trials.xcworkspace
drwxr-xr-x 4 james staff 128B 17 Dec 14:03 trialsTests
I used chmod to modify permissions of the podfiles as below:
-rwxr-xr-x 1 james staff 159B 25 Mar 2015 Podfile
-rwxr-xr-x 1 james staff 1.2K 25 Mar 2015 Podfile.lock
drwxr-xr-x 11 james staff 352B 17 Dec 14:03 Pods
drwxr-xr-x 52 james staff 1.6K 17 Dec 14:03 trials
drwxr-xr-x# 5 james staff 160B 17 Dec 14:03 trials.xcodeproj
drwxr-xr-x# 5 james staff 160B 17 Dec 14:03 trials.xcworkspace
drwxr-xr-x 4 james staff 128B 17 Dec 14:03 trialsTests
I then Cleaned my Build Folder, restarted but still have the same error.
I fixed the permission problem by running the following command.
chmod +x "Path to .sh"
Please replace ProjectName with your project name and username with your username
chmod +x /Users/username/Documents/ProjectName/Pods/Target\ Support\ Files/Pods-ProjectName/Pods-ProjectName-frameworks.sh
You can get the path from your xcode project as explained by step 1 to 3
I've tried #Sawsan method but get no luck even the file is already executable.
Here is the step how I solve it:
1.delete Podfile.lock
2.delete Pods directory
3.delete .xcworkspace file
4.Pod install again
that's it.
give it a try!
I have to own a trial for this solution and I got a proper result.
Follow the step:
1) Open Terminal and set a project path
"pod deintegrate" command executes
2) Then after "pod install" command executes.
I solved by deleting the Pods folder that was committed to the repo.

How to fix symbol __vdso_clock_gettime, version GLIBC_PRIVATE not defined in file libc.so.6 with link time reference [duplicate]

This question already has answers here:
Multiple glibc libraries on a single host
(11 answers)
Closed 4 years ago.
when I try to fix the problem /lib64/libc.so.6: version 'GLIBC_2.14' not found in CentOS 6 system by install latest glibc version to my home directory, I found my computer crashed.
$ conda
/public/home/liuxs/anaconda3/bin/python: relocation error: /lib64/librt.so.1: symbol __vdso_clock_gettime, version GLIBC_PRIVATE not defined in file libc.so.6 with link time reference
$ python
python: relocation error: /lib64/librt.so.1: symbol __vdso_clock_gettime, version GLIBC_PRIVATE not defined in file libc.so.6 with link time reference
I try my best to remove all the thing I have done and google to fix this, I failed. I cannot understand the problem, how it occurs and which part should I focus -- libc.so.6 or librt.so.1? Which is the key.
I have no root permission, so I cannot change the files for lib, lib64 etc.
$ ls -l $(locate librt.so.1)
lrwxrwxrwx 1 root root 13 Jul 6 2017 /lib64/librt.so.1 -> librt-2.12.so
lrwxrwxrwx 1 root root 17 Jul 6 2017 /lib64/rtkaio/librt.so.1 -> librtkaio-2.12.so
lrwxrwxrwx 1 root root 13 Aug 1 2017 /lib/i686/nosegneg/librt.so.1 -> librt-2.12.so
lrwxrwxrwx 1 root root 13 Aug 1 2017 /lib/librt.so.1 -> librt-2.12.so
lrwxrwxrwx 1 root root 17 Aug 1 2017 /lib/rtkaio/i686/nosegneg/librt.so.1 -> librtkaio-2.12.so
lrwxrwxrwx 1 root root 17 Aug 1 2017 /lib/rtkaio/librt.so.1 -> librtkaio-2.12.so
$ ls -l $(locate libc.so.6)
lrwxrwxrwx 1 root root 19 Dec 25 13:51 /lib64/libc.so.6 -> /lib64/libc-2.12.so
lrwxrwxrwx 1 root root 12 Aug 1 2017 /lib/i686/nosegneg/libc.so.6 -> libc-2.12.so
lrwxrwxrwx 1 root root 12 Aug 1 2017 /lib/libc.so.6 -> libc-2.12.so
I also have these two files in conda directory, which can not be locate
$ ls -l $(find . -name "libc.so.6")
-rwxrwxr-x 1 liuxs liuxs 3985000 Jun 21 2017 ./lib/libc.so.6
lrwxrwxr-x 1 liuxs liuxs 14 May 10 19:26 ./pkgs/gcc_impl_linux-64-7.2.0-habb00fd_3/x86_64-conda_cos6-linux-gnu/sysroot/lib/libc.so.6 -> libc-2.12.2.so
lrwxrwxr-x 1 liuxs liuxs 14 Mar 28 12:06 ./x86_64-conda_cos6-linux-gnu/sysroot/lib/libc.so.6 -> libc-2.12.2.so
[liuxs#HPC-login anaconda3]$ ls -l $(find . -name "librt.so.1")
lrwxrwxr-x 1 liuxs liuxs 15 Mar 28 11:25 ./pkgs/gcc_impl_linux-64-7.2.0-habb00fd_3/x86_64-conda_cos6-linux-gnu/sysroot/lib/librt.so.1 -> librt-2.12.2.so
lrwxrwxr-x 1 liuxs liuxs 15 Mar 28 12:06 ./x86_64-conda_cos6-linux-gnu/sysroot/lib/librt.so.1 -> librt-2.12.2.so
I think maybe it's file in anaconda3 make this error but I dont know how to locate the source of problem. And I dont know when I run conda or python, which librt.so.1 and libc.so.6 the commands use.
Hope someone can help me out of this.
I found how to fix this, the problem came from
-rwxrwxr-x 1 liuxs liuxs 3985000 Jun 21 2017 ./lib/libc.so.6
I change its name fro backup, and the system is okay now. Even though I don't very understand why it works. But the interesting thing is No matter where the file libc.so.6 is, the system will give an error. Maybe it's not a good answer, I modify its name from ./lib/libc.so.6 to ./lib/libc.so.6.bk in case I need it latter.
Thanks comment from #nos.
You are trying to run a program that is fundamentally incompatible
with the runtime of your CentOS 6 machine. You should find a pre-built
binary that is suitable for CentOS 6, or if this is an open source
project, build it yourself

My metasploit module(s) not found/loading

Any custom metasploit module I create isn't getting loaded.
I tried both of these demos:
https://www.offensive-security.com/metasploit-unleashed/building-module/ https://github.com/rapid7/metasploit-framework/wiki/Loading-External-Modules
and got the same result that the modules were NOT found.
Before posting here, I checked these out:
https://forums.kali.org/showthread.php?28940-Metasploit-modules-not-loading!
https://www.offensive-security.com/metasploit-unleashed/modules-and-locations
and from SO:
I can't get new modules to load in metasploit
How to add module in Metasploit?
no help
Just working with the github example, on the Kali host, I do indeed have the file in the right location (according to the demo):
root#kali:~/.msf4/modules/exploits/test# ls -al
total 12
drwxr-xr-x 2 root root 4096 Mar 19 13:59 .
drwxr-xr-x 3 root root 4096 Mar 19 13:58 ..
-rw-r--r-- 1 root root 9 Mar 19 13:59 test_module.rb
I then ran reload_all and when using this command:
use exploit/test/test_module it returns with Failed to load module.
I also tried to manually load that path and it failed too:
msf > loadpath ~/.msf4/modules/
Loaded 0 modules:
Posting the answer for anyone who may come across this. I'm kinda new to this; didn't know where metasploit info gets logged.
It's in: ~/.msf4/logs/framework.log
The log told me I had a syntax error... must have happened from copying and pasting the text from the browser. Cleaned that up and everything works.

cmake can not open file

When compiling a simple project with cmake I get
$ cmake CMakeLists.txt
CMake Error: cmListFileCache: error can not open file /cygdrive/d/Balladen/helloWorld/CMakeFiles/CMakeSystem.cmake
-- The C compiler identification is GNU 4.8.2
CMake Error: cmListFileCache: error can not open file /cygdrive/d/Balladen/helloWorld/CMakeFiles/CMakeCCompiler.cmake
CMake Error: Could not find cmake module file:/cygdrive/d/Balladen/helloWorld/CMakeFiles/CMakeCCompiler.cmake
-- The CXX compiler identification is GNU 4.8.2
CMake Error: cmListFileCache: error can not open file /cygdrive/d/Balladen/helloWorld/CMakeFiles/CMakeCXXCompiler.cmake
CMake Error: Could not find cmake module file:/cygdrive/d/Balladen/helloWorld/CMakeFiles/CMakeCXXCompiler.cmake
CMake Error: cmListFileCache: error can not open file /cygdrive/d/Balladen/helloWorld/CMakeFiles/CMakeSystem.cmake
CMake Error: cmListFileCache: error can not open file /cygdrive/d/Balladen/helloWorld/CMakeFiles/CMakeRCCompiler.cmake
CMake Error: Could not find cmake module file:/cygdrive/d/Balladen/helloWorld/CMakeFiles/CMakeRCCompiler.cmake
CMakeLists.txt:
cmake_minimum_required(VERSION 2.8.4)
project('helloWorld')
## Target
set(TEST_SRCS main.cpp)
add_executable(helloWorld ${TEST_SRCS})
## Link libraries
target_link_libraries(helloWorld ${CMAKE_THREAD_LIBS_INIT})
The files CMakeCCompiler and CMakeCXXCompiler do not exist, the file CMakeSystem.cmake has no access rights. Therefore they can not be read.
$ ls -la *
-rw-r--r--+ 1 WUD Domain Users 10195 Mar 26 17:59 CMakeCache.txt
----------+ 1 WUD Domain Users 426 Mar 26 17:53 CMakeLists.txt
----------+ 1 WUD Domain Users 64 Mar 26 17:58 main.cpp
----------+ 1 WUD Domain Users 5667 Mar 26 17:34 Makefile
CMakeFiles:
total 16
drwxr-xr-x+ 1 WUD Domain Users 0 Mar 26 17:59 .
d---------+ 1 WUD Domain Users 0 Mar 26 17:59 ..
-rw-r--r-- 1 WUD Domain Users 85 Mar 26 17:59 cmake.check_cache
-rw-r--r-- 1 WUD Domain Users 72 Mar 26 17:59 CMakeError.log
-rw-r--r-- 1 WUD Domain Users 803 Mar 26 17:59 CMakeOutput.log
---------- 1 WUD Domain Users 221 Mar 26 17:59 CMakeRCCompiler.cmake
---------- 1 WUD Domain Users 402 Mar 26 17:59 CMakeSystem.cmake
drwxr-xr-x+ 1 WUD Domain Users 0 Mar 26 17:59 CMakeTmp
drwxr-xr-x+ 1 WUD Domain Users 0 Mar 26 17:59 CompilerIdC
drwxr-xr-x+ 1 WUD Domain Users 0 Mar 26 17:59 CompilerIdCXX
If I copy the files from an other project and add reading rights to all files in CMakeFiles, then it works fine. I have this problem with several projects. Running it on a mounted drive DOES help (for example on a true-crypt drive).
So I guess problems with access rights.
All hints I found in the internet did not help.
I'm working with Windows 7, Cygwin 32bit, cmake version 2.8.9
Any idea?
This appears to be an issue with cmake being unable to process files with path lengths above 260 characters or more on Windows. To fix this issue you would need to reduce your path size to below 260 or set LongPathsEnabled to 1 in the file registry. See this issue for more details:
https://gitlab.kitware.com/cmake/cmake/-/issues/21875

Resources