kicad gcc error no such file or directory - windows

[ 59%] Compiling bitmap2component's resource file
gcc: error: Sanchez/AppData/Roaming/SPB_Data/src/MINGW-Packages/mingw-w64-kicad-git/src/kicad/bitmap2component: No such file or directory
E:\Documents2\MSYSkicadbuild\mingw64\bin\windres.exe: preprocessing failed.
make[2]: *** [bitmap2component/CMakeFiles/bitmap2component.dir/build.make:62: bitmap2component/CMakeFiles/bitmap2component.dir/bitmap2component_rc.obj] Error 1
make[1]: *** [CMakeFiles/Makefile2:1979: bitmap2component/CMakeFiles/bitmap2comp onent.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
Compiled kicad on msys2 followed http://kicad-source-mirror.readthedocs.io/en/latest/Documentation/development/compiling/index.html#building-kicad-from-source
It says there is no such file or directory but there is...
MSYS ~/src/MINGW-Packages/mingw-w64-kicad-git/src/kicad
$ ls
_clang-format cvpcb lib_dxf README.txt
3d-viewer demos new resources
AUTHORS.txt Documentation pagelayout_editor scripting
**bitmap2component** Doxyfile patches scripts
bitmaps_png eeschema pcb_calculator template
CMakeLists.txt gerbview pcbnew TODO.txt
CMakeModules helpers plugins tools
common include polygon uncrustify.cfg
copyright.h INSTALL.txt potrace utils
CTestConfig.cmake kicad qa
this is what is inside bitmap2component
bitmap2cmp_gui.cpp bitmap2component.cpp CMakeLists.txt
bitmap2cmp_gui_base.cpp bitmap2component.h Info.plist
bitmap2cmp_gui_base.fbp bitmap2component.icns
bitmap2cmp_gui_base.h bitmap2component.rc
I must be missing something a path or file idk any help would be appreciated.
ohh not sure if this help figure anything out but it will keep compiling to around 71% and then tell me something about eeschema_kiface error.

Related

How do I tell Cmake where to find gfortran?

I've tried to install DAMASK for study but faced many problems with it. There's nobody at university to help me with these problems, so I'm lookin' for help here.
For installing and working, DAMASK requires Cmake with gcc and gfortran and many programmer things like PETSc, scipy and numpy. I successfully installed all of that using homebrew, but cmake cause trouble. It doesn't seem to find gcc and gfortran at default.
With gcc I used
CC=/usr/bin/gcc
and it worked.
But it doesn't working with FC, 'cause
FC=/usr/bin/gfortran
not working
even
FC=/usr/local/cellar/gcc/10.2.0_4/bin/gfortran-10
not working
ah, I'm using Macos Catalina and the code of the whole errors there:
MacBook-Pro-Andrej:DAMASK admin1$ make spectral
/var/folders/yb/bvc9yx0s2mx4yts18q2hfblw0000gp/T/tmp.XzJ43HLr/Makefile.petsc:4: /lib/petsc/conf/rules: No such file or directory
/var/folders/yb/bvc9yx0s2mx4yts18q2hfblw0000gp/T/tmp.XzJ43HLr/Makefile.petsc:5: /lib/petsc/conf/variables: No such file or directory
make[1]: *** No rule to make target `/lib/petsc/conf/variables'. Stop.
/var/folders/yb/bvc9yx0s2mx4yts18q2hfblw0000gp/T/tmp.XzJ43HLr/Makefile.petsc:4: /lib/petsc/conf/rules: No such file or directory
/var/folders/yb/bvc9yx0s2mx4yts18q2hfblw0000gp/T/tmp.XzJ43HLr/Makefile.petsc:5: /lib/petsc/conf/variables: No such file or directory
make[1]: *** No rule to make target `/lib/petsc/conf/variables'. Stop.
/var/folders/yb/bvc9yx0s2mx4yts18q2hfblw0000gp/T/tmp.XzJ43HLr/Makefile.petsc:4: /lib/petsc/conf/rules: No such file or directory
/var/folders/yb/bvc9yx0s2mx4yts18q2hfblw0000gp/T/tmp.XzJ43HLr/Makefile.petsc:5: /lib/petsc/conf/variables: No such file or directory
make[1]: *** No rule to make target `/lib/petsc/conf/variables'. Stop.
/var/folders/yb/bvc9yx0s2mx4yts18q2hfblw0000gp/T/tmp.XzJ43HLr/Makefile.petsc:4: /lib/petsc/conf/rules: No such file or directory
/var/folders/yb/bvc9yx0s2mx4yts18q2hfblw0000gp/T/tmp.XzJ43HLr/Makefile.petsc:5: /lib/petsc/conf/variables: No such file or directory
make[1]: *** No rule to make target `/lib/petsc/conf/variables'. Stop.
/var/folders/yb/bvc9yx0s2mx4yts18q2hfblw0000gp/T/tmp.XzJ43HLr/Makefile.petsc:4: /lib/petsc/conf/rules: No such file or directory
/var/folders/yb/bvc9yx0s2mx4yts18q2hfblw0000gp/T/tmp.XzJ43HLr/Makefile.petsc:5: /lib/petsc/conf/variables: No such file or directory
make[1]: *** No rule to make target `/lib/petsc/conf/variables'. Stop.
Found PETSC_DIR:
Found PETSC_INCLUDES:
Found PETSC_EXTERNAL_LIB:
Found PETSC_LINKER:
Found MPI Fortran Compiler:
Found MPI C Compiler:
-- The Fortran compiler identification is unknown
CMake Error at CMakeLists.txt:109 (project):
No CMAKE_Fortran_COMPILER could be found.
Tell CMake where to find the compiler by setting either the environment
variable "FC" or the CMake cache entry CMAKE_Fortran_COMPILER to the full
path to the compiler, or to the compiler name if it is in the PATH.
-- Configuring incomplete, errors occurred!
See also "/Users/admin1/DAMASK/CMakeFiles/CMakeOutput.log".
See also "/Users/admin1/DAMASK/CMakeFiles/CMakeError.log".
make: *** [build/spectral] Error 1
I don't know anything in UNIX programming but I was told to do it if I want to write my
thesis and my diploma...
So I'm lookin' for help here...

Buildroot plugin file is compiled for the target architecture altough used later in Makefile

I am trying to create an package for dietsplash for buildroot, and I've added the files
Config.in
config BR2_PACKAGE_DIETSPLASH
bool "dietsplash"
help
dietsplash is an simple splash screen service for
embedded devices. It has support for animations.
dietsplash.mk
################################################################################
#
# dietsplash
#
################################################################################
DIETSPLASH_VERSION = v0.3
DIETSPLASH_SOURCE = dietsplash-$(DIETSPLASH_VERSION).tar.gz
DIETSPLASH_SITE = git://github.com/lucasdemarchi/dietsplash.git
DIETSPLASH_AUTORECONF = YES
$(eval $(autotools-package))
The github repository is
https://github.com/lucasdemarchi/dietsplash
The output of make is:
>>> dietsplash v0.3 Building
PATH="/media/justus_fluegel/PROJECTS/buildroot/buildroot-2019.11.1/output/host/bin:/media/justus_fluegel/PROJECTS/buildroot/buildroot-2019.11.1/output/host/sbin:/home/justus_fluegel/.pub-cache/bin/:/usr/share/flutter/flutter/bin/cache/dart-sdk/bin/:/usr/share/flutter/flutter/bin/:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/sbin:/usr/sbin:/snap/bin:/usr/local/texlive/2019/bin/x86_64-linux" /usr/bin/make -j5 -C /media/justus_fluegel/PROJECTS/buildroot/buildroot-2019.11.1/output/build/dietsplash-v0.3/
make[1]: Entering directory '/media/justus_fluegel/PROJECTS/buildroot/buildroot-2019.11.1/output/build/dietsplash-v0.3'
/usr/bin/make all-am
make[2]: Entering directory '/media/justus_fluegel/PROJECTS/buildroot/buildroot-2019.11.1/output/build/dietsplash-v0.3'
GEN src/background.h
/bin/bash: src/genstaticlogo: cannot execute binary file: Exec format error
Makefile:1017: recipe for target 'src/background.h' failed
make[2]: *** [src/background.h] Error 126
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory '/media/justus_fluegel/PROJECTS/buildroot/buildroot-2019.11.1/output/build/dietsplash-v0.3'
Makefile:400: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/media/justus_fluegel/PROJECTS/buildroot/buildroot-2019.11.1/output/build/dietsplash-v0.3'
package/pkg-generic.mk:238: recipe for target '/media/justus_fluegel/PROJECTS/buildroot/buildroot-2019.11.1/output/build/dietsplash-v0.3/.stamp_built' failed
make: *** [/media/justus_fluegel/PROJECTS/buildroot/buildroot-2019.11.1/output/build/dietsplash-v0.3/.stamp_built] Error 2
And file of src/genstaticlogo
src/genstaticlogo: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 4.19.0, not stripped
I think the problem is that src/genstaticlogo is compiled for the target but executed by the Makefile.am during the build process. How do I tell make to compile src/genstaticlogo for the build machine and not for the target? Altough the repository is not my work, it's theoretically possible to modify the makefile after download.
Thank you for your help!
You will need to patch the Makefile.am to support cross-compilation. See this old answer for details. In short, you will need something like this in the Makefile.am:
$(genstaticlogo_OBJECTS): CC=$(CC_FOR_BUILD)
$(genstaticlogo_OBJECTS): CFLAGS=$(CFLAGS_FOR_BUILD)
$(genstaticlogo_OBJECTS): CPPFLAGS=$(CPPFLAGS_FOR_BUILD)
Since you will be patching Makefile.am, you will also need to set DIETSPLASH_AUTORECONF = YES in the Buildroot dietsplash.mk file.

Cannot find a link library (lNrrdIO)

I am trying to install NrrdIO on Ubuntu 18.04, to run Marching Cubes to segment medical images. This is the link from which I'm trying to run it.
http://web.cse.ohio-state.edu/research/graphics/isotable/
I'm trying to install ijkmcube-v0-3-3.tar, which requires the ITKNrrdIO.a library. I'm running into this error:
[ 7%] Linking CXX executable ijkmcube
/usr/bin/ld: cannot find -lNrrdIO
collect2: error: ld returned 1 exit status
CMakeFiles/ijkmcube.dir/build.make:406: recipe for target 'ijkmcube' failed
make[2]: *** [ijkmcube] Error 1
CMakeFiles/Makefile2:131: recipe for target 'CMakeFiles/ijkmcube.dir/all' failed
make[1]: *** [CMakeFiles/ijkmcube.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2
I've installed NrrdIO 1.11.0, and tried with NrrdIO 1.9.0 as well, but while running
make
I always run into this error, for some reason its not able to find lNrrdIO . Can someone please help?
Thanks
Edit:
I think its a problem with the linking, but when I copied the NrrdIO.a file to /usr/bin and modified the symbolic link to point to it, I got an error as follows:
[ 7%] Linking CXX executable ijkmcube
collect2: fatal error: cannot find 'ld'
compilation terminated.
CMakeFiles/ijkmcube.dir/build.make:406: recipe for target 'ijkmcube'
failed
make[2]: *** [ijkmcube] Error 1
CMakeFiles/Makefile2:131: recipe for target '
CMakeFiles/ijkmcube.dir/all' failed
make[1]: *** [CMakeFiles/ijkmcube.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2
Can someone help? Thank you
Edit 2
PROJECT(IJKMCUBE)
#---------------------------------------------------------
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
IF (NOT DEFINED ${IJK_DIR})
GET_FILENAME_COMPONENT(IJK_ABSOLUTE_PATH "../.." ABSOLUTE)
SET(IJK_DIR ${IJK_ABSOLUTE_PATH} CACHE PATH "IJK directory")
ENDIF (NOT DEFINED ${IJK_DIR})
SET(CMAKE_INSTALL_PREFIX "${IJK_DIR}/")
SET(LIBRARY_OUTPUT_PATH ${IJK_DIR}/lib CACHE PATH "Library directory")
SET(IJKMCUBE_DIR "src/ijkmcube")
SET(NRRD_LIBDIR "${IJK_DIR}/lib")
SET(IJK_ISOTABLE_DIR "${IJK_DIR}/isotable" CACHE PATH "Isotable
directory")
#---------------------------------------------------------
IF (NOT CMAKE_BUILD_TYPE)
SET (CMAKE_BUILD_TYPE Release CACHE STRING
"Default build type: Release" FORCE)
ENDIF (NOT CMAKE_BUILD_TYPE)
INCLUDE_DIRECTORIES("${IJK_DIR}/include")
LINK_DIRECTORIES("${NRRD_LIBDIR}")
LINK_LIBRARIES(expat NrrdIO z)
ADD_DEFINITIONS(-DIJK_ISOTABLE_DIR=\"${IJK_ISOTABLE_DIR}\")
ADD_EXECUTABLE(ijkmcube ijkmcube_main.cxx ijkmcubeIO.cxx ijkmcube.cxx
ijkmcube_datastruct.cxx ijkmcube_sub.cxx
ijkmcube_extract.cxx ijkmcube_util.cxx
ijksnapmc.cxx
ijktable.cxx ijktable_poly.cxx ijktable_ambig.cxx
ijkoctree.cxx ijkxitIO.cxx)
ADD_LIBRARY(ijkmcubeL STATIC EXCLUDE_FROM_ALL ijkmcubeIO.cxx
ijkmcube.cxx ijkmcube_datastruct.cxx ijkmcube_sub.cxx
ijkmcube_extract.cxx ijkmcube_util.cxx ijksnapmc.cxx
ijktable.cxx ijkoctree.cxx ijkxitIO.cxx)
SET_TARGET_PROPERTIES(ijkmcubeL PROPERTIES OUTPUT_NAME ijkmcube)
ADD_CUSTOM_TARGET(lib DEPENDS ijkmcubeL)
SET(CMAKE_INSTALL_PREFIX ${IJK_DIR})
INSTALL(TARGETS ijkmcube DESTINATION "bin/linux")
ADD_CUSTOM_TARGET(tar WORKING_DIRECTORY ../.. COMMAND tar cvfh
${IJKMCUBE_DIR}/ijkmcube.tar ${IJKMCUBE_DIR}/README
${IJKMCUBE_DIR}/INSTALL ${IJKMCUBE_DIR}/RELEASE_NOTES
${IJKMCUBE_DIR}/*.cxx ${IJKMCUBE_DIR}/*.h ${IJKMCUBE_DIR}/*.txx
${IJKMCUBE_DIR}/CMakeLists.txt ${IJKMCUBE_DIR}/man/*
${IJKMCUBE_DIR}/ijkmcube_doxygen.config)
ADD_CUSTOM_TARGET(doc COMMAND doxygen ijkmcube_doxygen.config)
SOLVED
Tsyvarev solved it, the libNrrdIO.a file has to be copied to /usr/lib/. Refer to comments for the exact solution
This answer was given by #Tsyvarev:
By making a link named ld you are removing the original linker (ld). Without the linker you definitely cannot build any library. What you need is to make a link named lNrrdIO.a, so it will point to the actual library location: sudo ln -sfn /home/subham/Downloads/NrrdIO-1.9.0-src/lNrrdIO.a lNrrdIO.a (run this command from /usr/lib directory). And restore original /usr/bin/ld file.

Makefile error when building on Cygwin

I am installing some NASA's software (HEASoft) from the source code on Cygwin (32-bit) running on Windows 10. Configure ran successfully, but make gives the following errors:
Makefile:26: /home/Mario/heasoft-6.21/heacore/BUILD_DIR/Makefile-std: No such file or directory
gmake[2]: *** No rule to make target '/home/Mario/heasoft-6.21/heacore/BUILD_DIR/Makefile-std'. Stop.
gmake[2]: Leaving directory 'C:/cygwin/home/Mario/heasoft-6.21/heacore/BUILD_DIR'
make[1]: *** [Makefile:74: heacore] Error 2
make[1]: se sale del directorio '/home/Mario/heasoft-6.21/BUILD_DIR'
make: *** [Makefile:10: all] Error 2
My problem is that the file /home/Mario/heasoft-6.21/heacore/BUILD_DIR/Makefile-std is not found; however, it actually exists and is located in the correct directory. EDIT: here it can be seen that this file exists:
$ ls /home/Mario/heasoft-6.21/heacore/BUILD_DIR
config.guess config.sub hd_config_info headas-init.csh headas-setup.in hmakerc lhea-fixperl Makefile-CCfits
config.log configure hd_install.c headas-init.sh hmake hmakerc.in Makefile Makefile-std
config.status configure.in hd_scanenv headas-setup hmake_hd install-sh Makefile.in
Any clue why this might be happening and how can be solved?
When Cygwin shell is opened cd /cygdrive/c/home/Mario and run make on your project from that directory. I remember I had similar issue when the current directory was /home/foo. I got it solved just changing the directory to /cygdrive/c/home/foo which is definitely is the same directory, but somehow Cygwin's Make likes it better

Compiling GCC 4.7.3 for i386-elf support on Cygwin

I am trying to compile GCC for Cygwin with support for targeting i386-elf so I can compile some simple OSes (search Benu, by l30nard0, on Github). I've successfully compiled the binutils for i386-elf, and compiled all of GCC's floating-point numbers dependencies.
Problem is, it says windows.h can not be found. I do have w32api successfully installed, and tried including each of those one at a time in the include path for GCC, but none of them work. If I try any of them, I get so many errors and warnings that not all will show up in the Cygwin console. The dozens upon dozens of warnings are most if not all unused parameter.
Does anyone know where the problem might lie?
I've wasted the last three entire days of my life trying to get Linux Mint set up with everything I want, but for reasons I shan't go into I gave up on that. I'd love to be able to get just one thing to work so I can enjoy my life again. :) Thanks!
BTW: The configure arguments I used were --target=i386-elf --enable-threads=win32 --enable-languages=c,c++ Was I supposed to use --enable-targets instead?
And here's part of the log:
In file included from ../../../gcc/libgcc/gthr.h:150:0,
from ../../../gcc/libgcc/unwind-dw2.c:38:
./gthr-default.h:541:21: fatal error: windows.h: No such file or directory
compilation terminated.
../../../gcc/libgcc/static-object.mk:17: recipe for target 'unwind-dw2.o' failed
make[2]: *** [unwind-dw2.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from ../../../gcc/libgcc/gthr.h:150:0,
from ../../../gcc/libgcc/unwind-dw2-fde.c:38:
./gthr-default.h:541:21: fatal error: windows.h: No such file or directory
compilation terminated.
../../../gcc/libgcc/static-object.mk:17: recipe for target 'unwind-dw2-fde.o' failed
make[2]: *** [unwind-dw2-fde.o] Error 1
make[2]: Leaving directory '/home/Sean/gccbuild/i386-elf/libgcc'
Makefile:10055: recipe for target 'all-target-libgcc' failed
make[1]: *** [all-target-libgcc] Error 2
make[1]: Leaving directory '/home/Sean/gccbuild'
Makefile:870: recipe for target 'all' failed
make: *** [all] Error 2
Remove the --enable-threads=win32 flag; it is intended to specify thread support on the target system, not the build system.

Resources