I got into the book "Beginning STM32" - Warren Gay.
I tried to build the sources under Cygwin, but even if the path to the required files is denoted in the makefile, the required files were not found.The file in the folders libopencm3/cm3/scb.h lays in the path: /home/root/STM32/stm32f103c8t6/libopencm3/include so the correct path should be /home/root/STM32/stm32f103c8t6/libopencm3/include/libopencm3/cm3/scb.h and I checked the presence of the files.
So I tried to change the #include into #include "file.h" with the required header file in the source folder - this worked, but there are a lot of cases in different source files.
Is there any suggestion to get this fixed or to find a way to get out of this?
Thanks a lot!
This is what I got from the terminal.
[~/STM32/stm32f103c8t6]
$ make
make -C rtos/libwwg
make[1]: Entering directory '/home/root/STM32/stm32f103c8t6/rtos/libwwg'
make -w -C ./src
make[2]: Entering directory '/home/root/STM32/stm32f103c8t6/rtos/libwwg/src'
arm-none-eabi-gcc -Os -g -std=c99 -mthumb -mcpu=cortex-m3 -msoft-float -mfix-cortex-m3-ldrd -Wextra -Wshadow -Wimplicit-function-declaration -Wredundant-decls -Wmissing-prototypes -Wstrict-prototypes -fno-common -ffunction-sections -fdata-sections -I/home/root/STM32/stm32f103c8t6/libopencm3/include -I/home/root/STM32/stm32f103c8t6//rtos/libwwg/include -I./rtos -I. -MD -Wall -Wundef -DSTM32F1 -I/home/root/STM32/stm32f103c8t6/libopencm3/include -I/home/root/STM32/stm32f103c8t6//rtos/libwwg/include -o usbcdc.o -c usbcdc.c
usbcdc.c:7:10: fatal error: libopencm3/cm3/scb.h: No such file or directory
7 | #include <libopencm3/cm3/scb.h>
| ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [../../../Makefile.incl:111: usbcdc.o] Error 1
make[2]: Leaving directory '/home/root/STM32/stm32f103c8t6/rtos/libwwg/src'
make[1]: *** [Makefile:8: all] Error 2
make[1]: Leaving directory '/home/root/STM32/stm32f103c8t6/rtos/libwwg'
make: *** [Makefile:41: libwwg] Error 2
So, I know what is the source of the problem.
There are problems in Cygwin with the path format or rather between the interaction between the Windows and Linux path formats. I could solve the problem by changing the paths in the Makefile from the Linux /home/folder to the Windows D:\home\folder\ format.
more detailed answer beginners:
modifying 2 lines at "Makefile.incl" may solve the problem.
"Makefile.incl" is suppose to be in ~/STM32/stm32f103c8t6 folder in above case.
Following are the lines in "Makefile.incl"
#TOP_DIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
TOP_DIR := C:\xyz\home\STM32\stm32f103c8t6
#OPENCM3_DIR := $(abspath $(dir $(abspath $(lastword $(MAKEFILE_LIST))))/libopencm3)
OPENCM3_DIR := c:/xyz/home/STM32/stm32f103c8t6/libopencm3
'\' or '/' in path doesn't matter
Related
I'm trying to upgrade xml-security-c-2.0.2. I extracted the tar file on my linux environment. I exported the following xerces environment variables below before the ./configure command:
Env variables:
export xerces_LIBS=/opt/shibboleth-sp/lib
export xerces_CFLAGS=/opt/shibboleth-sp/include
configure command:
./configure --without-xalan --disable-static --prefix=/opt/shibboleth-sp
Once I run make, I get the following error:
make[2]: Entering directory `/opt/build/xml-security-c-2.0.2/xsec'
g++ -DHAVE_CONFIG_H -I.. -I.. -DXSEC_BUILDING_TOOLS /opt/shibboleth-sp/include -Wall -O2 -DNDEBUG -pthread -MT tools/xtest/xsec_xtest-xtest.o -MD -MP -MF tools/xtest/.deps/xsec_xtest-xtest.Tpo -c -o tools/xtest/xsec_xtest-xtest.o `test -f 'tools/xtest/xtest.cpp' || echo './'`tools/xtest/xtest.cpp
In file included from tools/xtest/xtest.cpp:32:0:
**../xsec/framework/XSECDefs.hpp:63:39: fatal error: xercesc/util/XercesDefs.hpp: No such file or directory
#include <xercesc/util/XercesDefs.hpp>''**'
For whatever reason it cannot find the source file XercesDefs.hpp. This has been an issue for a month or so where we cannot figure out why it isn't finding that source file. When I run a find on this particular file, I get the following path showing it is indeed in multiple locations:
/opt/build/xerces-c-3.2.3/src/xercesc/util/XercesDefs.hpp
/opt/shibboleth-sp/include/xercesc/util/XercesDefs.hpp
Is there something in the compile process that is making this not work or not pick this up? Should I be exporting something else in order to pick up this file?
We currently have version xml-security-c-1.7.3 installed on the machine. Would it be easier to use this version? Is there some sort of bug with 2.0.2 or something that needs to be configured from going from version 1.x to 2.x?
This is all to upgrade shibboleth idp, and installing all the needed dependencies prior to Shibboleth build.
> current OS version Linux version 4.14.214-118.339.amzn1.x86_64
> (gcc version 7.2.1 20170915 (Red Hat 7.2.1-2) (GCC)) #1 SMP
Any help is very much appreciated!
EDIT:
I've exported my CXXFLAGS to point at include however I'm still getting the following error when I issue the make command:
make all-recursive
make[1]: Entering directory `/opt/build/xml-security-c-2.0.2'
Making all in xsec
make[2]: Entering directory `/opt/build/xml-security-c-2.0.2/xsec'
/bin/sh ../libtool --tag=CXX --mode=link g++ /opt/shibboleth-sp/include -Wall /opt/shibboleth-sp/include -O2 -DNDEBUG -pthread -o xsec-xtest tools/xtest/xsec_xtest-xtest.o libxml-security-c.la /opt/shibboleth-sp/lib /opt/apache2_4_46/bin
libtool: link: g++ /opt/shibboleth-sp/include -Wall /opt/shibboleth-sp/include -O2 -DNDEBUG -pthread -o .libs/xsec-xtest tools/xtest/xsec_xtest-xtest.o /opt/shibboleth-sp/lib /opt/apache2_4_46/bin ./.libs/libxml-security-c.so -pthread -Wl,-rpath -Wl,/opt/shibboleth-sp/lib
/opt/shibboleth-sp/include: file not recognized: Is a directory
collect2: error: ld returned 1 exit status
make[2]: *** [xsec-xtest] Error 1
make[2]: Leaving directory `/opt/build/xml-security-c-2.0.2/xsec'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/opt/build/xml-security-c-2.0.2'
make: *** [all] Error 2
What is going on with this?
RHEL 7.2 is the year 2015 update. Current is 7.8 (yum update).
XercesDefs.hpp: No such file
xml-security-c-2.0.2 configure will look in /usr/include, /usr/local/include ! When you have a "hide away" location, the INCLUDE path must be specified : See $ ./configure --help
Example : CXXFLAGS=-I/opt/shibboleth-sp/include , I.e. →
$ ./configure --prefix=/opt/shibboleth-sp CXXFLAGS=-I/opt/shibboleth-sp/include
Bugs : There are no bugs in xml-security-c-2.0.2 . Will compile without errors in EL 7 ( 3 minutes, g++73 (or with the default g++ ver. 4.8 )).
Ref your comment »» I need the .tar.gz files «« : Please follow the link https://ftp.gwdg.de/pub/opensuse/repositories/home%3A/Scott_Cantor/CentOS_7/ → src/
Example $ bash unPack_rpm.sh xml-security-c-2.0.2-4.2.src.rpm and you get xml-security-c-2.0.2-4.2.src/{xml-security-c-2.0.2.tar.bz2 , xml-security-c.spec}
Script unPack_rpm.sh https://drive.google.com/file/d/1q3d9QqrRhEThYByPDgWEaoxHnqWFWqfE/view?usp=sharing
Get build-deps : # yum-builddep xml-security-c.spec
OS: Windows 10
Hello, really hope someone can help as i am desperately trying to install the QMYSQL driver. I am aware that there have been tons of posts about this, but my issue is still not resolved and i really don't know why... My mysql.h file certainly does exist, and thus its path is provided for include. I have latest versions of Qt (5.8 with sources) and MySql (5.7). In mysql installation I chose developer default and installation was successful. I will be happy to provide any further information. I ask for anyone that can help please. Thank you.
in cmd from:
C:\Qt\5.8\Src\qtbase\src\plugins\sqldrivers\mysql
i run:
qmake "INCLUDEPATH+=C:\Program Files\MySQL\MySQL Server 5.7\include" "LIBS+=C:\Program Files\MySQL\MySQL Server 5.7\lib" mysql.pro
then mingw32-make as normal.
i get:
mingw32-make -f Makefile.Release all
mingw32-make[1]: Entering directory 'C:/Qt/5.8/Src/qtbase/src/plugins /sqldrivers/mysql'
g++ -c -pipe -fno-keep-inline-dllexport -O2 -std=c++1z -fno-exceptions -frtti -Wall -Wextra
-Wvla -Wdate-time -DUNICODE -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_NO_EXCEPTIONS
-DQT_NO_DEBUG -DQT_PLUGIN -DQT_SQL_LIB -DQT_CORE_LIB -I. -IC:\Program -IFiles\MySQL\MySQL
-IServer -I5.7\include -IC:\Qt\5.8\mingw53_32\include\QtSql\5.8.0 -IC:\Qt\5.8\mingw53_32
\include\QtSql\5.8.0\QtSql -IC:\Qt\5.8\mingw53_32\include\QtCore\5.8.0 -IC:\Qt\5.8\mingw53_32\include\
QtCore\5.8.0\QtCore -IC:\Qt\5.8\mingw53_32\include -IC:\Qt\5.8\mingw53_32\include\QtSql -IC:\Qt\5.8\
mingw53_32\include\QtCore -I.moc\release -IC:\utils\my_sql\my_sql\include -IC:\utils\postgresql
\pgsql\include -IC:\openssl\include -I..\..\..\..\mkspecs\win32-g++ -o .obj\release\qsql_mysql.o qsql_mysql.cpp
In file included from qsql_mysql.cpp:40:0:qsql_mysql_p.h:60:19: fatal error: mysql.h: No such file or directory
compilation terminated.
Makefile.Release:355: recipe for
target '.obj/release/qsql_mysql.o' failed
mingw32-make[1]: *** [.obj/release/qsql_mysql.o] Error 1
mingw32-make[1]: Leaving directory
'C:/Qt/5.8/Src/qtbase/src/plugins /sqldrivers/mysql'
Makefile:38: recipe for target 'release-all' failed
mingw32-make: *** [release-all] Error 2
I want to learn to use shaders and therefore created a new C++ project on Netbeans (ver. 8.0.2).
I want to include the GLFW and the GLEW Library like stated in this tutorial: http://www.learnopengl.com/#!Getting-started/Creating-a-window
I think i included the librarys successfully. (Netbeans shows no error when using #include <GL\glew.h> or #include <GLFW\glfw3.h>, so i think it finds all the files).
My System: Windows 10 x64, using GNU gcc compiler via cygwin
Now here is the problem:
When i try to run the program, there is the following output:
"/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
make[1]: Entering directory '/cygdrive/c/Users/Erik/programming/projects/FinallyShaders'
"/usr/bin/make" -f nbproject/Makefile-Debug.mk dist/Debug/Cygwin-Windows/finallyshaders.exe
make[2]: Entering directory '/cygdrive/c/Users/Erik/programming/projects/FinallyShaders'
mkdir -p build/Debug/Cygwin-Windows
rm -f "build/Debug/Cygwin-Windows/main.o.d"
gcc -c -g -include /cygdrive/C/Users/Erik/programming/Libraries/glew-1.13.0-win32/glew-1.13.0/include/GL -include /cygdrive/C/Users/Erik/programming/Libraries/glfw-3.1.2.bin.WIN32/glfw-3.1.2.bin.WIN32/include/GLFW -MMD -MP -MF "build/Debug/Cygwin-Windows/main.o.d" -o build/Debug/Cygwin-Windows/main.o main.c
cc1: fatal error: /cygdrive/C/Users/Erik/programming/Libraries/glew-1.13.0-win32/glew-1.13.0/include/GL: No such file or directory
compilation terminated.
nbproject/Makefile-Debug.mk:66: recipe for target 'build/Debug/Cygwin-Windows/main.o' failed
make[2]: *** [build/Debug/Cygwin-Windows/main.o] Error 1
make[2]: Leaving directory '/cygdrive/c/Users/Erik/programming/projects/FinallyShaders'
nbproject/Makefile-Debug.mk:59: recipe for target '.build-conf' failed
make[1]: *** [.build-conf] Error 2
make[1]: Leaving directory '/cygdrive/c/Users/Erik/programming/projects/FinallyShaders'
nbproject/Makefile-impl.mk:39: recipe for target '.build-impl' failed
make: *** [.build-impl] Error 2
BUILD FAILED (exit value 2, total time: 722ms)
It seems to fail because the gcc compiler (or more precisely the cc1 part of it) can't find the include-directory for the library. But, as stated, the path is correct. When using cd <the path that cannot be found> everything works and cygwin finds this path.
(My program does nothing but calling printf() until now, that shouldn't be the problem)
Does anybody know what this could mean and how to solve this?
Thanks for your help
Erik Brendel
Your failing compiler commandline is:
gcc -c -g \
-include /cygdrive/C/Users/Erik/programming/Libraries/glew-1.13.0-win32/glew-1.13.0/include/GL \
-include /cygdrive/C/Users/Erik/programming/Libraries/glfw-3.1.2.bin.WIN32/glfw-3.1.2.bin.WIN32/include/GLFW \
-MMD -MP -MF "build/Debug/Cygwin-Windows/main.o.d" \
-o build/Debug/Cygwin-Windows/main.o main.c
To fix the reported error:
cc1: fatal error: /cygdrive/C/Users/Erik/programming/Libraries/glew-1.13.0-win32/glew-1.13.0/include/GL: No such file or directory
it should be:
gcc -c -g \
-I/cygdrive/C/Users/Erik/programming/Libraries/glew-1.13.0-win32/glew-1.13.0/include/GL \
-I/cygdrive/C/Users/Erik/programming/Libraries/glfw-3.1.2.bin.WIN32/glfw-3.1.2.bin.WIN32/include/GLFW \
-MMD -MP -MF "build/Debug/Cygwin-Windows/main.o.d" \
-o build/Debug/Cygwin-Windows/main.o main.c
You have confused the compiler options -include and -I. See the documentation of
these options
Here is a pretty good introductory tutorial to the use of GCC
In the Netbeans project properties, the include search-directories should be
entered in Build -> C Compiler -> Include Directories, not Include Headers.
Are you configuring the proyect linker for Netbeans?? This means telling the IDE you will be using libraries that are not added by default with just the include command, for example the math.h library(remember you had to compile with -lm via command promp, it's the same thing).
This can be done by going to run-proyect configuration-customize-Linker-Libraries(you click on the button with says ...).
Then you click on add pkgconfig library or standard(for something like math.h or pthread in unix systems), and search for the library you wish to add.
So, I am trying to write Makefile.am that will check the source code and the dependencies for the build.
configure.in
AC_PREREQ([2.68])
AC_INIT([hello], [1.0], [basinbug at yahoo.com])
AC_CONFIG_SRCDIR([src/hello.cpp])
AM_INIT_AUTOMAKE
AC_PROG_CXX
PKG_CHECK_MODULES([GTK], [gtk+-2.0 >= 2.10])
AC_CONFIG_FILES([Makefile src/Makefile])
AC_OUTPUT
src/Makefile.am
bin_PROGRAMS = hello
hello_CFLAGS = $(GTK_CFLAGS)
hello_LDFLAGS = $(GTK_LIBS)
hello_SOURCES = hello.cpp
what happens when i run "make"
Making all in src
make[1]: Entering directory `/home/maza/123/src'
g++ -DPACKAGE_NAME=\"hello\" -DPACKAGE_TARNAME=\"hello\" -DPACKAGE_VERSION=\"1.0\" -DPACKAGE_STRING=\"hello\ 1.0\" -DPACKAGE_BUGREPORT=\"basinbug\ at\ yahoo.com\" -DPACKAGE_URL=\"\" -DPACKAGE=\"hello\" -DVERSION=\"1.0\" -I. -g -O2 -MT hello.o -MD -MP -MF .deps/hello.Tpo -c -o hello.o hello.cpp
hello.cpp:2:21: fatal error: gtk/gtk.h: No such file or directory
compilation terminated.
make[1]: *** [hello.o] Error 1
make[1]: Leaving directory `/home/maza/123/src'
make: *** [all-recursive] Error 1
If I'm going as AC_PROG_CC, they are used for compile the string, through AC_PROG_CXX it is not used
You are telling the autotools that your project is a C++ project (with AC_PROG_CXX) but you are then setting a C flag variable (hello_CFLAGS).
The matching variable for C++ is hello_CXXFLAGS.
That being said neither of those is the correct flag to use for this usage. The correct flag (thanks ptomato) is hello_CPPFLAGS.
I'm trying to compile CRF++ v0.51 which comes with ParsCit. configure does not show anything missing, however, when I try to make I get this error:
make all-am
make[1]: Entering directory `/path/to/parscit/crfpp/CRF++-0.51'
/bin/bash ./libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -O3 -Wall -Wno-deprecated -c -o node.lo node.cpp
libtool: compile: g++ -DHAVE_CONFIG_H -I. -O3 -Wall -Wno-deprecated -c node.cpp -fPIC -DPIC -o .libs/node.o
In file included from node.h:13:0,
from node.cpp:9:
path.h:26:52: error: 'size_t' has not been declared
make[1]: *** [node.lo] Error 1
make[1]: Leaving directory `/path/to/parscit/crfpp/CRF++-0.51'
make: *** [all] Error 2
I was able to compile the newer version CRF++ v0.58 but ParsCit seems to need that v0.51.
Based on the answers all around, I first added the import "stdlib.h" and import < iostream> lines to both node.cpp and path.cpp at the end of the import list. But it didn't work. Then (with some slight luck) thought to add the import lines at the start of the import list in both these files. And BRAVO!!!, it worked. CAUTION: I am not sure whether stdlib or iostream worked, but which one worked can be figured out easily.
You should try adding #include<iosteream> in the 'node.cpp' file and compile crf++ again, as instructed in troubleshooting page.
Hope that helps.
Include the header file stdlib.h in path.h file.
It worked for me.