You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just want to compile a portable binary which runable on linux, windows and macos. I download the toolchain and use CC=/root/code/cosmocc/bin/cosmocc make to compile it on linux.
But it failed with the following errors.
[root@ha-master-1 gguf-tools]# CC=/root/code/cosmocc/bin/cosmocc make
/root/code/cosmocc/bin/cosmocc gguf-tools.c gguflib.c sds.c fp16.c \
-march=native -ffast-math \
-g -ggdb -Wall -W -pedantic -O3 -o gguf-tools
cosmocc: fatal error: -march=native can't be used when building fat binaries
compilation terminated.
make: *** [Makefile:4: gguf-tools] Error 1
[root@ha-master-1 gguf-tools]#
I have to use x86_64-unknown-cosmo-cc instead of cosmocc.
[root@ha-master-1 gguf-tools]# CC=/root/code/cosmocc/bin/x86_64-unknown-cosmo-cc make
/root/code/cosmocc/bin/x86_64-unknown-cosmo-cc gguf-tools.c gguflib.c sds.c fp16.c \
-march=native -ffast-math \
-g -ggdb -Wall -W -pedantic -O3 -o gguf-tools
In function 'sdsll2str',
inlined from 'sdsfromlonglong' at sds.c:516:15:
sds.c:473:12: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
473 | *s = *p;
| ~~~^~~~
......
[root@ha-master-1 gguf-tools]# /root/code/cosmocc/bin/x86_64-linux-cosmo-objcopy -SO binary gguf-tools gguf-tools.com
[root@ha-master-1 gguf-tools]# file gguf-tools gguf-tools.com
gguf-tools: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), statically linked, with debug_info, not stripped
gguf-tools.com: DOS/MBR boot sector; partition 1 : ID=0x7f, active, start-CHS (0x0,0,1), end-CHS (0x3ff,255,63), startsector 0, 4294967295 sectors
[root@ha-master-1 gguf-tools]# ./gguf-tools.com -h
Usage: ./gguf-tools.com <subcommand> [arguments...] [options...]
Subcommands:
show <filename> -- show GGUF model keys and tensors.
inspect-tensor <filename> <tensor-name> [count] -- show tensor weights.
compare <file1> <file2> -- avg weights diff for matching tensor names.
split-mixtral <ids...> mixtral.gguf out.gguf -- extract expert.
Options:
--verbose :With 'show', print full arrays (e.g. token lists)
--diffable :Don't show tensor file offsets and sizes
Example:
split-mixtral 65230776370407150546470161412165 mixtral.gguf out.gguf
[root@ha-master-1 gguf-tools]#
The text was updated successfully, but these errors were encountered:
I just want to compile a portable binary which runable on linux, windows and macos. I download the toolchain and use
CC=/root/code/cosmocc/bin/cosmocc make
to compile it on linux.But it failed with the following errors.
I have to use
x86_64-unknown-cosmo-cc
instead ofcosmocc
.The text was updated successfully, but these errors were encountered: