Compile cyanoboot: No rule to make target - c++

I'm trying to compile the cyanoboot project found here. I have no experience with c++ compiling but I've followed the read-me and seem to have hit a brick wall. I've extracted the downloaded source files and navigated to them in cygwin, I then run the command:
make clean
which looks like it is successful. After that I run
make omap4430sdp_config
which also seems to work but doesn't create any files(not sure if it should?). Then, when I run the final make command I get the error:
makefile:98: /cygdrive/c/cyanoboot/config.mk: No such file or directory
make: *** No rule to make target `/cygdrive/c/cyanoboot/config.mk'. Stop.
This config.mk file definitely does exist, you can see it at the git hub link above and I haven't changed any files. I've been struggling with this for a few hours now and I just cant figure it out. Any help is much appreciated. Thanks.

This package is new to me. But, there are multiple processors supported, for example i386/m68k/arm. Therefore you will likely need environment set up properly, for example ARCH=arm and CROSS_COMPILE=arm-linux-gnueabi-
To check if make config worked, you can look for modified or new files. Doing it myself, here you see a link has been added:
~/cmn/CMNookTablet-acclaim_cyanoboot-02c6247$ find . | xargs ls -alt | more
lrwxrwxrwx 1 joe joe 7 Oct 24 10:03 ./include/asm -> asm-arm
...
I tried your build with my toolchain, got this FWIW
...
arm-linux-gnueabi-gcc -g -Os -fno-strict-aliasing -fno-common -ffixed-r8 -msoft-float -D_KERNEL_ -DTEXT_BASE=0x80e80000 -I/home/joe/cmn/CMNookTablet-acclaim_cyanoboot-02c6247/include -fno-builtin -ffreestanding -nostdinc -isystem /usr/lib/gcc/arm-linux-gnueabi/4.6/include -pipe -DCONFIG_ARM -D_ARM_ -march=armv7-a -mabi=apcs-gnu -Wall -Wstrict-prototypes -c -o hal_services.o hal_services.c
{standard input}: Assembler messages:
{standard input}:276: Error: selected processor does not support Thumb mode `smc #0'
make[1]: * [hal_services.o] Error 1
make[1]: Leaving directory `/home/joe/cmn/CMNookTablet-acclaim_cyanoboot-02c6247/board/omap4430sdp'
make: * [board/omap4430sdp/libomap4430sdp.a] Error 2

Related

How can I build on ubuntu something that was meant for FreeBSD?

I'm trying to build this: https://github.com/hselasky/hpsat_generate
this is their makefile:
PROG_CXX=hpsat_generate
PREFIX?=/usr/local
MAN=
SRCS= hpsat_generate.cpp
BINDIR?=${PREFIX}/bin
.if defined(HAVE_DEBUG)
CFLAGS+= -g -O0
.endif
CFLAGS+= -I${PREFIX}/include
LDFLAGS+= -L${PREFIX}/lib -lgmp -lgmpxx
.include <bsd.prog.mk>
using just make . results in
Makefile:7: *** missing separator. Stop.
so after some searching I found that I need to use FreeBSD make, so I tried:
bmake . hpsat_generate
which complains that mergesort is not declared, which is a FreeBSD function so I can only assume it doesn't really includes it.
I tried finding a way to make it run but I'm out of ideas..
The Makefile requires some changes for Linux (and NetBSD). The bsd.prog.mk implementation that comes with bmake on Linux is slightly off, and requires a workaround to link the program correctly, also, on Linux you need libbsd:
These issues are fixed by PR #1.
Instead of running the makefile just execute this:
g++ -o sat sat.cpp -lgmp -lgmpxx -l:libbsd.a
you may need to install the gmp and libbsd libraries

C++ CodeBlocks and wxWidgets file not found?

I'm pretty new to C::B and just installed it along with building wxWidgets. I'm pretty sure my wxWidgets build with MinGW is good, i was able to successfully create a wxWidgets project in C::B using the "minimal.cpp" sample in wxWidgets. However now instead of creating an empty project, I'm using leaving "Empty project" unchecked in wizard to create the program. With wxWidgets this creates 2 source files and 2 header files (for app and main). When I try to build+play the project though without making any changes i get this error:
-------------- Build: Debug in MULLSIMPLE (compiler: GNU GCC Compiler)---------------
g++.exe -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE -Winvalid-pch -include wx_pch.h -DWX_PRECOMP -Wall -g -D__WXDEBUG__ -I"C:\Program Files\wxWidgets-3.0.5\include" -I"C:\Program Files\wxWidgets-3.0.5\lib\gcc_dll\mswud" -c "C:\Users\gmloo\OneDrive\Desktop\C++ Projects\MULLSIMPLE\wx_pch.h" -o wx_pch.h.gch\Debug_wx_pch_h_gch
g++.exe -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE -Winvalid-pch -include wx_pch.h -DWX_PRECOMP -Wall -g -D__WXDEBUG__ -I"C:\Program Files\wxWidgets-3.0.5\include" -I"C:\Program Files\wxWidgets-3.0.5\lib\gcc_dll\mswud" -c "C:\Users\gmloo\OneDrive\Desktop\C++ Projects\MULLSIMPLE\MULLSIMPLEApp.cpp" -o obj\Debug\MULLSIMPLEApp.o
g++.exe -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE -Winvalid-pch -include wx_pch.h -DWX_PRECOMP -Wall -g -D__WXDEBUG__ -I"C:\Program Files\wxWidgets-3.0.5\include" -I"C:\Program Files\wxWidgets-3.0.5\lib\gcc_dll\mswud" -c "C:\Users\gmloo\OneDrive\Desktop\C++ Projects\MULLSIMPLE\MULLSIMPLEMain.cpp" -o obj\Debug\MULLSIMPLEMain.o
windres.exe -I"C:\Program Files\wxWidgets-3.0.5\include" -I"C:\Program Files\wxWidgets-3.0.5\lib\gcc_dll\mswud" -J rc -O coff -i C:\Users\gmloo\OneDrive\Desktop\C__PRO~1\MULLSI~1\resource.rc -o obj\Debug\resource.res
g++.exe -L"C:\Program Files\wxWidgets-3.0.5\lib\gcc_dll" -o bin\Debug\MULLSIMPLE.exe obj\Debug\MULLSIMPLEApp.o obj\Debug\MULLSIMPLEMain.o obj\Debug\resource.res -mthreads -lwxmsw30ud_core -lwxbase30ud -lwxpngd -lwxzlibd -mwindows
gcc: error: Files\wxWidgets-3.0.5\include: No such file or directory
gcc: error: Files\wxWidgets-3.0.5\lib\gcc_dll\mswud: No such file or directory
windres.exe: preprocessing failed.
Process terminated with status 1 (0 minute(s), 14 second(s))
Process terminated with status 0 (0 minute(s), 16 second(s))
3 error(s), 0 warning(s) (0 minute(s), 16 second(s))
Saying that it can't find files? the wxWidgets-3.0.5 is actually in c:\Program Files/wxWidgets-3.0.5, so maybe its looking in the wrong place? Or maybe I missed a step setting it up?
This is absolutely everything I did to install C::B, install wxWidgets, and create my project
1. Installing CodeBlocks
a. Clicked codeblocks-20.03mingw-setup.exe from website, then download started automaticallty from fosshub
b. Ran executable to install and for type of install did "All plugins, all tools, just everything"
-all checkboxes were checked, including
1. Default Install
2. Contrib Plugins
3. C::B CBP2Make
4. C::B Share Config
5. C::B Launcher
6. MinGW Compiler Suite
2. Downloading wxWidgets
a. Clicked "Windows ZIP" from downloads page on website under "Latest Stable Release: 3.0.5"
b. Extracted download to c:\Program Files\wxWidgets-3.0.5
-first file asked for administrator permission, i said "dont ask again" and clicked "continue"
3. Added MinGW to path
a. went into c:\Program Files\CodeBlocks\MinGW\bin and copied that path to PATH environment variables
4. Building wxWidgets
a. opened a terminal with admin privileges and went to c:\Program Files\wxWidgets-3.0.5\build\msw.
b. entered commands as suggested at https://wiki.wxwidgets.org/Compiling_wxWidgets_with_MinGW, except changed
BUILD=release to BUILD=debug:
1. mingw32-make -f makefile.gcc SHARED=1 UNICODE=1 BUILD=debug clean
2. mingw32-make -f makefile.gcc SHARED=1 UNICODE=1 BUILD=debug
c. wxWidgets successfully built (3:38 pm to 4:22pm!)
5. Opened CodeBlocks
a. got message that "After auto-detection, at least one compiler's master path is still empty and therefore invalid.
Inspect the list below and change the compiler's master path later in the compiler options. Select you favourite
default compiler here:"
-There's one compiler listed as detected: GNU GCC Compiler
-With this compiler highlighted, i clicked "Set as default" and then ok.
b. got message CodeBlocks is not default app for C/C++ source files.
-Selected "Yes, associate with C/C++ files"
7. Testing Compiler
-I wasn't sure what to do about "setting compiler master path..." msg earlier, so I just created a new project with type
"Console application", compiled the basic "Hello world" application, ran it, ran fine, so I assume compiler is working?
6. Create new wxWidgets program:
a. Create new project: wxWidgets project
b. Wizard Steps:
PAGE 1:
-Set version: wxWidgets 3.0.x
PAGE 2:
-Named project "MULLSIMPLE" and created directory
PAGE 3:
-Skipped Author info.
PAGE 4:
-Preferred GUI Builder: None
-Application Type: Frame Based
PAGE 5:
-wxWidgets location: C:\Program Files\wxWidgets-3.0.5
-When I hit next, it opens the global variable editor. I don't know how to use this,
so i just hit ok without making any changes. IT asked if i want to save an invalid global var,
i said yes. Now the widgets location in the wizard is a path instead of a global variable,
I assume this is ok for now
PAGE 6:
-By default "Debug" configuration checked, "Release" configuration is unchecked
-make no changes
PAGE 7:
-Under wxWidgets library settings:
-CHECK Use wxWidgets DLL
-UNCHECK wxWidgets built as monolithic
-CHECK enable unicode
-Under Miscellaneous settings:
-UNCHECK create empty project
-CHECK create and use PCH
-Leave configuration input field blank
-UNCHECK Configure Advanced Options
-On next get dialog re PCH default settings, click YES to accept
PAGE 8:
-Didn't select any additional libs to add to project,
just hit finish
8. Try Build and run
-Get the build log error at start of post re: missing files
Thanks
#user4581301 thanks for your response it looks like that was the problem. I copied the wxWidgets-3.0.5 to the desktop. Then i opened up the old one in prog files, cleaned the build, then deleted that folder. Then i created a new C::B proj using the wxWidgets path to the one on the desktop, and now the error is gone.
I don't 100% understand how wxWidgets works so I hope just copying the whole folder to another location is fine, but so far program seems to be working. Thanks

cc1plus: error: unrecognized command line option "-fsysroot=<path>" with g++

Am trying to compile a large C++ project in a simulated 32bits environment (cel5.03-i386-2.3) on a 64bits machine. (The compiling worked well on 32bits machine before)
During this compiling some files fail as below. The weird thing is that the argument passed to g++ command is "--sysroot=" while in error message it becomes "-fsysroot=".
Why could this happen?
/usr/bin/g++ -MMD -MF /proj/src/.debug/lib/osiris/core/utils/WWNConverter.d -I/proj/src/lib/osiris -DDEBUG_LOG -DDEBUG -D_REENTRANT -DAPE_MODE -DSWAT_MODE -g -Werror -Wall -Wno-write-strings -fPIC -m32 --sysroot=/auto/andpkg/rep_cache//wr-x86/3.0FCS/sysroot -rdynamic -I/proj/src -I/proj/src/.debug/include/private -I/proj/src/.debug/include/public -I/proj/src/lib/framework -I/proj/src/lib/osiris -I/proj/src/lib/prt -I/proj/src/lib/callhome -I/proj/src/lib/snmp -I/proj/src/.debug/external/pcre/include -I/proj/src/external/sqlite/include -I/proj/src/external/openssl/openssl-fips-1.2.3/include -I/proj/src/support/storage-driver/include -I/proj/src/external/json/include -DTARGET_OBJECT=libosiris.so -I/proj/src/.debug/external/pcre/include -I/proj/src/.debug/external/libcurl/include -o /proj/src/.debug/lib/osiris/core/utils/WWNConverter.o -c /proj/src/lib/osiris/core/utils/WWNConverter.cc
make[1]: *** [/proj/src/.debug/lib/osiris/core/utils/WWNConverter.o] Error 1
cc1plus: error: unrecognized command line option "-fsysroot=/auto/andpkg/rep_cache//wr-x86/3.0FCS/sysroot"
The 32-bit compiler (GCC 3.4.6) is too old to support the --sysroot option, which was added to trunk with commit 102367, and did not make it into a release branch until GCC 4.1.0.
2005-07-25 Mark Mitchell <mark#codesourcery.com>
* gcc.c (option_map): Add --sysroot.
(process_command): Handle --sysroot.
(display_help): Document it.
* doc/cppopts.tex (-isysroot): Document.
* doc/invoke.texi (--sysroot): Document.
* doc/install.texi (--with-build-sysroot): Document.
* Makefile.in (inhibit_libc): New variable.
(INHIBIT_LIBC_CFLAGS): Likewise.
(LIBGCC2_CFLAGS): Include
$(INHIBIT_LIBC_CFLAGS).
(CRTSTUFF_CFLAGS): Include $(INHIBIT_LIBC_CFLAGS).
($(T)crtbegin.o): Do not use #inhibit_libc#.
($(T)crtend.o): Likewise.
($(T)crtbeginS.o): Do not use #inhibit_libc#.
($(T)crtendS.o): Likewise.
($(T)crtbeginT.o): Do not use #inhibit_libc#.
($(T)crtendT.o): Likewise.
(stmp-fixinc): Do not complain about missing headers if
inhibit_libc.
* configure.ac (inhibit_libc): Set it to true/false.
(--with-build-sysroot): New option. Use it to set
SYSTEM_HEADER_DIR.
* configure: Regenerated.

Compiling Yap on windows 8

I am trying to compile yap on my PC since it seems YAP default installers don't come with the Depth limit flag enabled. I need this to work on an ILP project on Aleph.
The thing is, that I am forced to use a PC with windows 8 without enough memory for a Linux Virtual machine.
I got cygwin to attempt to install it, but once I get to the 'make' stage of the installation ( http://www.dcc.fc.up.pt/~vsc/Yap/Yap4.3/yap.html#SEC2 ) I get this following error
$ make
Makefile:714: warning: overriding recipe for target 'yap.dll'
Makefile:545: warning: ignoring old recipe for target 'yap.dll'
gcc -mno-cygwin -c -O3 -fomit-frame-pointer -Wall -Wstrict-prototypes -Wmissing-prototypes -g -O2 -DCUT_C=1 -DCOROUTINING=1 -DRATIONAL_TREES=1 -DDEPTH_LIMIT=1 -DHAVE_CONFIG_H -D_YAP_NOT_INSTALLED_=1 -I. -I../H -I../OPTYap -I../BEAM -I../MYDDAS ../C/agc.c -o agc.o
gcc: error: unrecognized command line option ‘-mno-cygwin’
Makefile:488: recipe for target 'agc.o' failed
make: *** [agc.o] Error 1
I assume it's due to the latest YAP being outdated right now, does anyone know what to do to work around this?
It seems long time has passed since the question is asked. But I would like to answer since the problem is still relevant (I had this problem lately).
Asking at YAP-users mailing list, I was able to solve this problem. You can check the details here.
In short, using MSYS2 or MinGW-w64 (with toolchain installed) and making few changes in the source code makes it possible.
Changes are:
Adding #include <stdio.h> in blob.c file.
Refactoring H with HEAD (or some other name) in whole project. Which was defined in Regs.h, line 590.

failed to exec /Applications/Xcode.app/Contents/Developer/usr/bin/clang: No such file or directory

Xcode 5 breaks my compilation script. I suspect because clang is now located directly in /usr/bin instead of its usual location. However, I'm not sure how I can tell this to gcc. Any tips would be much appreciated. I am compiling for iOS.
CPPFLAGS= -arch i686 --sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk -fno-short-wchar -fno-short-enums -miphoneos-version-min=4.2.1
CXXFLAGS= -arch i686 --sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk -fno-short-wchar -fno-short-enums -miphoneos-version-min=4.2.1
CFLAGS=
gcc -Iinclude -arch i686 --sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk -fno-short-wchar -fno-short-enums -miphoneos-version-min=4.2.1 -c -o src_c/stem_UTF_8_danish.o src_c/stem_UTF_8_danish.c
gcc: failed to exec /Applications/Xcode.app/Contents/Developer/usr/bin/clang: No such file or directory
make: *** [src_c/stem_UTF_8_danish.o] Error 71
Update. I was able to repeat the problem by directly calling gcc from the iPhoneSimulator usr/bin with no arguments.
tim$ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform//Developer/us r/bin/gcc
gcc: failed to exec /Applications/Xcode.app/Contents/Developer/usr/bin/clang: No such file or directory
I was able to get it to compile by using clang from /usr/bin with the appropriate sysroot. but is this equivalent?
I noticed the same problem when I upgraded to Xcode 5.1 When I ran "xcrun -find clang", it said "You have not agreed to the XCode license agreements. You must agree to both Xcode license agreements below in order to use Xcode." It spewed out the agreements and gave me an opportunity to agree, which I did. And that fixed the problem. Go figure.
Cheers - Ed