mentos-team / MentOS

An educational 32-bit linux-like Operating System, with public bachelor- and master-level course slides.
https://mentos-team.github.io/
MIT License
138 stars 51 forks source link

COMPILATION ERROR #16

Open kizerbo opened 11 months ago

kizerbo commented 11 months ago

ciao installando il sistema ho creato una cartella build dopo di che ho lanciato '' cmake ..'' ed è andato a buon fine.E poi '' make '' dove mi da l'errore:

kizerbo@MBP-de-Koffi build % make -- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) -- Crosscompiling : FALSE -- System name : Darwin -- Kernel version : 23.1.0 -- Setting scheduler type to SCHEDULER_RR. -- Setting vide type to VGA_TEXT_MODE. -- Setting keyboard mapping to KEYMAP_US. -- Setting emulator output type to OUTPUT_STDIO. -- Configuring done (0.3s) -- Generating done (0.2s) -- Build files have been written to: /Users/kizerbo/documents/MentOS-master/build [ 0%] Building C object libc/CMakeFiles/libc.dir/src/stdio.c.o clang: error: unsupported argument 'i686' to option '-march=' make[2]: [libc/CMakeFiles/libc.dir/src/stdio.c.o] Error 1 make[1]: [libc/CMakeFiles/libc.dir/all] Error 2 make: *** [all] Error 2

grazie mille

kizerbo commented 11 months ago

..update:

usando l'opzione ''march = native'' al posto di ''march=i686'' nei due makefile mi da un error diverso:

kizerbo@MBP-de-Koffi build % make [ 0%] Building C object libc/CMakeFiles/libc.dir/src/stdio.c.o In file included from /Users/kizerbo/documents/MentOS-master/libc/src/stdio.c:6: /Users/kizerbo/documents/MentOS-master/libc/inc/sys/errno.h:8:23: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] extern int *__geterrno(); ^ void In file included from /Users/kizerbo/documents/MentOS-master/libc/src/stdio.c:7: /Users/kizerbo/documents/MentOS-master/libc/inc/stdio.h:37:12: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] int getchar(); ^ void In file included from /Users/kizerbo/documents/MentOS-master/libc/src/stdio.c:11: /Users/kizerbo/documents/MentOS-master/libc/inc/sys/unistd.h:63:20: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] extern pid_t getpid(); ^ void /Users/kizerbo/documents/MentOS-master/libc/inc/sys/unistd.h:81:20: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] extern pid_t setsid(); ^ void /Users/kizerbo/documents/MentOS-master/libc/inc/sys/unistd.h:98:20: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] extern pid_t getgid(); ^ void /Users/kizerbo/documents/MentOS-master/libc/inc/sys/unistd.h:108:20: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] extern uid_t getuid(); ^ void /Users/kizerbo/documents/MentOS-master/libc/inc/sys/unistd.h:118:21: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] extern pid_t getppid(); ^ void /Users/kizerbo/documents/MentOS-master/libc/inc/sys/unistd.h:125:18: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] extern pid_t fork(); ^ void 8 errors generated. make[2]: [libc/CMakeFiles/libc.dir/src/stdio.c.o] Error 1 make[1]: [libc/CMakeFiles/libc.dir/all] Error 2 make: *** [all] Error 2 kizerbo@MBP-de-Koffi build %

* ho un MacBook con processore M1, arm64**

grazie

Galfurian commented 11 months ago

IT Allora, ho sistemato quegli errori che stai vedendo nella versione dell'OS presente sul branch develop. Creado tu stia utilizzando clang 15. Quindi, come prima cosa ti consiglio di spostarti su quel branch (git checkout develop).

Poi elimina la cartella build e procedi con una compilazione pulita.

EN So, I've dealt with those errors you are seeing in the OS version of the develop branch. I think you are compiling with clang 15. That said, I recommend you check out that branch (git checkout develop).

Then, you should delete the build folder and start a new (clean) compilation.

kizerbo commented 11 months ago

ciao, ho fatto come hai detto ma non me lo compila lo stesso( non ho più scaricato la cartella mentos-master ma develop(aggiornato)) mi da lo stesso errore di prima

kizerbo@MBP-de-Koffi ~ % cd documents kizerbo@MBP-de-Koffi documents % cd mentos kizerbo@MBP-de-Koffi mentos % mkdir build kizerbo@MBP-de-Koffi mentos % cd build kizerbo@MBP-de-Koffi build % ls kizerbo@MBP-de-Koffi build % cmake .. -- The C compiler identification is AppleClang 15.0.0.15000040 -- The ASM compiler identification is AppleClang -- Found assembler: /Library/Developer/CommandLineTools/usr/bin/cc -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Setting build type to 'Debug' as none was specified. -- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) -- Crosscompiling : FALSE -- System name : Darwin -- Kernel version : 23.1.0 -- Setting scheduler type to SCHEDULER_RR. -- Setting vide type to VGA_TEXT_MODE. -- Setting keyboard mapping to KEYMAP_US. -- Setting emulator output type to OUTPUT_STDIO. -- Configuring done (0.6s) -- Generating done (0.1s) -- Build files have been written to: /Users/kizerbo/documents/MentOS/build kizerbo@MBP-de-Koffi build % make [ 1%] Building C object libc/CMakeFiles/libc.dir/src/stdio.c.o clang: error: unsupported argument 'i686' to option '-march=' make[2]: [libc/CMakeFiles/libc.dir/src/stdio.c.o] Error 1 make[1]: [libc/CMakeFiles/libc.dir/all] Error 2 make: *** [all] Error 2

kizerbo commented 11 months ago

--update:

provando a cambiare nei file march=i686 con march=native mi da l'error questo come errore

kizerbo@MBP-de-Koffi build % cmake .. -- The C compiler identification is AppleClang 15.0.0.15000040 -- The ASM compiler identification is AppleClang -- Found assembler: /Library/Developer/CommandLineTools/usr/bin/cc -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Setting build type to 'Debug' as none was specified. -- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) -- Crosscompiling : FALSE -- System name : Darwin -- Kernel version : 23.1.0 -- Setting scheduler type to SCHEDULER_RR. -- Setting vide type to VGA_TEXT_MODE. -- Setting keyboard mapping to KEYMAP_US. -- Setting emulator output type to OUTPUT_STDIO. -- Configuring done (0.6s) -- Generating done (0.1s) -- Build files have been written to: /Users/kizerbo/documents/MentOS/build kizerbo@MBP-de-Koffi build % make [ 1%] Building C object libc/CMakeFiles/libc.dir/src/stdio.c.o [ 1%] Building C object libc/CMakeFiles/libc.dir/src/ctype.c.o [ 1%] Building C object libc/CMakeFiles/libc.dir/src/string.c.o [ 2%] Building C object libc/CMakeFiles/libc.dir/src/stdlib.c.o /Users/kizerbo/documents/MentOS/libc/src/stdlib.c:28:5: error: invalid output constraint '=a' in asm inline_syscall1(ptr, brk, real_size); ^ /Users/kizerbo/documents/MentOS/libc/inc/system/syscall_types.h:230:28: note: expanded from macro '__inline_syscall1' : "=a"(res) \ ^ /Users/kizerbo/documents/MentOS/libc/src/stdlib.c:83:5: error: invalid output constraint '=a' in asm inline_syscall1(_res, brk, ptr); ^ /Users/kizerbo/documents/MentOS/libc/inc/system/syscall_types.h:230:28: note: expanded from macro '__inline_syscall1' : "=a"(res) \ ^ 2 errors generated. make[2]: [libc/CMakeFiles/libc.dir/src/stdlib.c.o] Error 1 make[1]: [libc/CMakeFiles/libc.dir/all] Error 2 make: *** [all] Error 2

grazie

Galfurian commented 11 months ago

Potresti mostrarmi cosa ti ritorna il comando:

clang --print-supported-cpus
kizerbo commented 11 months ago

ritorna questo:

kizerbo@MBP-de-Koffi ~ % clang --print-supported-cpus Apple clang version 15.0.0 (clang-1500.0.40.1) Target: arm64-apple-darwin23.1.0 Thread model: posix InstalledDir: /Library/Developer/CommandLineTools/usr/bin Available CPUs for this target:

a64fx
ampere1
apple-a10
apple-a11
apple-a12
apple-a13
apple-a14
apple-a15
apple-a16
apple-a7
apple-a8
apple-a9
apple-latest
apple-m1
apple-m2
apple-s4
apple-s5
carmel
cortex-a34
cortex-a35
cortex-a510
cortex-a53
cortex-a55
cortex-a57
cortex-a65
cortex-a65ae
cortex-a710
cortex-a72
cortex-a73
cortex-a75
cortex-a76
cortex-a76ae
cortex-a77
cortex-a78
cortex-a78c
cortex-r82
cortex-x1
cortex-x1c
cortex-x2
cyclone
exynos-m3
exynos-m4
exynos-m5
falkor
generic
kryo
neoverse-512tvb
neoverse-e1
neoverse-n1
neoverse-n2
neoverse-v1
neoverse-v2
saphira
thunderx
thunderx2t99
thunderx3t110
thunderxt81
thunderxt83
thunderxt88
tsv110

Use -mcpu or -mtune to specify the target's processor. For example, clang --target=aarch64-unknown-linux-gui -mcpu=cortex-a35