Giter Site home page Giter Site logo

Help about hob3l HOT 23 CLOSED

GabrieleMoretti avatar GabrieleMoretti commented on July 24, 2024
Help

from hob3l.

Comments (23)

virtualritz avatar virtualritz commented on July 24, 2024

Ciao Gabriele.

I'm not the author and I just borrowed my old MacBook Pro to a friend until January so I can't verify what I write below.

OTO, after installing XCode from the Mac App Store and opening a terminal, you should be able to do:

xcode --select install
git clone https://github.com/moehriegitt/hob3l
cd hob3l
make

And that should produce the hobl3d executable.

If you run into an problems just post the output you get here and I try to help as good as I can until I get my MacBook back.

from hob3l.

GabrieleMoretti avatar GabrieleMoretti commented on July 24, 2024

thank you very much. I have still a problem after 'make' command (clang: error: invalid value 'us-ascii' in '-finput-charset=us-ascii')

MacBook-Pro-3:hob3l gabrielemoretti$ make
gcc -MMD -MP -MT out/bin/hob3l/main.o -c -o out/bin/hob3l/main.o src/hob3l/main.c  -I./include -std=c11 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wundef -D_FORTIFY_SOURCE=2   -finput-charset=us-ascii  -Iout/src/hob3l -O2 -g3 -W -Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wnested-externs -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wshadow -Wdeprecated -Wconversion -Wsign-conversion -Wstrict-overflow=5 -Wshadow -Wmultichar -Wfloat-equal -Wbad-function-cast -Wredundant-decls -Wvla  -pipe -fwrapv -fstack-protector-strong -fPIE -fomit-frame-pointer  -Wlogical-op -Wjump-misses-init -Wtrampolines -Wsuggest-attribute=format -Wsuggest-attribute=noreturn -Wshift-overflow=2 -fmax-errors=10  -fno-delete-null-pointer-checks -fno-strict-overflow -pie -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -Wl,-z,defs 
clang: warning: -Wl,-z,noexecstack: 'linker' input unused [-Wunused-command-line-argument]
clang: warning: -Wl,-z,relro: 'linker' input unused [-Wunused-command-line-argument]
clang: warning: -Wl,-z,now: 'linker' input unused [-Wunused-command-line-argument]
clang: warning: -Wl,-z,defs: 'linker' input unused [-Wunused-command-line-argument]
clang: error: invalid value 'us-ascii' in '-finput-charset=us-ascii'
make: *** [out/bin/hob3l/main.o] Error 1

from hob3l.

virtualritz avatar virtualritz commented on July 24, 2024

I had a brief look, it looks like clang is ran with gcc arguments for some weird reason.

Do these things in the hob3l folder, in your terminal:

rm .mode.d
rm -r out

This should create a pristine build environmemt.

Next, open Makefile in your favorite text editor, go to line 43 which reads:

TARGET ?= gcc

Change that line to:

TARGET ?= clang

Save the file and try running make again.

If it succeeds, the hob3l executable is found in out/bin/hob3l.x.

I.e. you should be able to run it by e.g. entering:

out/bin/hob3l.x --help

Kringers fossed & buon natale!

from hob3l.

GabrieleMoretti avatar GabrieleMoretti commented on July 24, 2024

Thanks a lot but still a problem:

./script/mkswitch src/hob3l/opt.switch > out/src/hob3l/opt.inc.new
mv out/src/hob3l/opt.inc.new out/src/hob3l/opt.inc
clang -MMD -MP -MT out/bin/hob3l/main.o -c -o out/bin/hob3l/main.o src/hob3l/main.c  -I./include -std=c11 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wundef -D_FORTIFY_SOURCE=2     -Iout/src/hob3l -O2 -g3 -W -Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wnested-externs -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wshadow -Wdeprecated -Wconversion -Wsign-conversion -Wstrict-overflow=5 -Wshadow -Wmultichar -Wfloat-equal -Wbad-function-cast -Wredundant-decls -Wvla  -pipe -fwrapv -fstack-protector-strong -fPIE -fomit-frame-pointer  -Wno-missing-field-initializers -Wno-missing-braces   
src/hob3l/main.c:6:10: fatal error: 'hob3lbase/base-mat.h' file not found
#include <hob3lbase/base-mat.h>
         ^~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make: *** [out/bin/hob3l/main.o] Error 1

from hob3l.

virtualritz avatar virtualritz commented on July 24, 2024

Thanks a lot but still a problem:

Is this when running make?

from hob3l.

GabrieleMoretti avatar GabrieleMoretti commented on July 24, 2024

Yes, after I launched make

from hob3l.

GabrieleMoretti avatar GabrieleMoretti commented on July 24, 2024
MacBook-Pro-3:hob3l gabrielemoretti$ make
./script/mkswitch src/hob3l/opt.switch > out/src/hob3l/opt.inc.new
mv out/src/hob3l/opt.inc.new out/src/hob3l/opt.inc
clang -MMD -MP -MT out/bin/hob3l/main.o -c -o out/bin/hob3l/main.o src/hob3l/main.c  -I./include -std=c11 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wundef -D_FORTIFY_SOURCE=2     -Iout/src/hob3l -O2 -g3 -W -Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wnested-externs -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wshadow -Wdeprecated -Wconversion -Wsign-conversion -Wstrict-overflow=5 -Wshadow -Wmultichar -Wfloat-equal -Wbad-function-cast -Wredundant-decls -Wvla  -pipe -fwrapv -fstack-protector-strong -fPIE -fomit-frame-pointer  -Wno-missing-field-initializers -Wno-missing-braces   
src/hob3l/main.c:6:10: fatal error: 'hob3lbase/base-mat.h' file not found
#include <hob3lbase/base-mat.h>
         ^~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make: *** [out/bin/hob3l/main.o] Error 1

from hob3l.

virtualritz avatar virtualritz commented on July 24, 2024

This is very weird. I will need access to my MacBood first to try reproducing this.

Can you just check that the include/hob3lbase/base-mat.h file exists? E.g. enter:

ls include/hob3lbase/base-mat.h

from hob3l.

GabrieleMoretti avatar GabrieleMoretti commented on July 24, 2024
MacBook-Pro-3:hob3l gabrielemoretti$ ls include/hob3lbase/base-mat.h
ls: include/hob3lbase/base-mat.h: No such file or directory

from hob3l.

GabrieleMoretti avatar GabrieleMoretti commented on July 24, 2024

Thanks a lot, Merry Christmas:-)

from hob3l.

virtualritz avatar virtualritz commented on July 24, 2024
MacBook-Pro-3:hob3l gabrielemoretti$ ls include/hob3lbase/base-mat.h
ls: include/hob3lbase/base-mat.h: No such file or directory

So that file missing means something got deleted/your git clone didn't finish, etc. I would clone this repository again and start from scratch.

I.e. this is a problem that is unrelated to you building on macOS.

Remove the old repository completely (rm -rf hob3l from the folder above or use Finder).
Then:

git clone https://github.com/moehriegitt/hob3l
cd hob3l

Now edit the Makefile, line 43, and replace the gcc with clang (see above).
Then:

make
out/bin/hob3l.x --help

from hob3l.

GabrieleMoretti avatar GabrieleMoretti commented on July 24, 2024

Hi, something has changed but still 1 error:

MacBook-Pro-3:code gabrielemoretti$ rm -rf hob3l
MacBook-Pro-3:code gabrielemoretti$ git clone https://github.com/moehriegitt/hob3l
Cloning into 'hob3l'...
remote: Enumerating objects: 3708, done.
remote: Counting objects: 100% (460/460), done.
remote: Compressing objects: 100% (321/321), done.
remote: Total 3708 (delta 205), reused 286 (delta 138), pack-reused 3248
Receiving objects: 100% (3708/3708), 10.58 MiB | 8.81 MiB/s, done.
Resolving deltas: 100% (2567/2567), done.
MacBook-Pro-3:code gabrielemoretti$ cd hob3l
MacBook-Pro-3:hob3l gabrielemoretti$ make
./script/mkswitch src/hob3l/opt.switch > out/src/hob3l/opt.inc.new
mv out/src/hob3l/opt.inc.new out/src/hob3l/opt.inc
clang -MMD -MP -MT out/bin/hob3l/main.o -c -o out/bin/hob3l/main.o src/hob3l/main.c  -I./include -std=c11 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wundef -D_FORTIFY_SOURCE=2     -Iout/src/hob3l -O2 -g3 -W -Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wnested-externs -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wshadow -Wdeprecated -Wconversion -Wsign-conversion -Wstrict-overflow=5 -Wshadow -Wmultichar -Wfloat-equal -Wbad-function-cast -Wredundant-decls -Wvla  -pipe -fwrapv -fstack-protector-strong -fPIE -fomit-frame-pointer  -Wno-missing-field-initializers -Wno-missing-braces   
clang -MMD -MP -MT out/bin/hob3l/internal.o -c -o out/bin/hob3l/internal.o src/hob3l/internal.c  -I./include -std=c11 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wundef -D_FORTIFY_SOURCE=2     -O2 -g3 -W -Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wnested-externs -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wshadow -Wdeprecated -Wconversion -Wsign-conversion -Wstrict-overflow=5 -Wshadow -Wmultichar -Wfloat-equal -Wbad-function-cast -Wredundant-decls -Wvla  -pipe -fwrapv -fstack-protector-strong -fPIE -fomit-frame-pointer  -Wno-missing-field-initializers -Wno-missing-braces   
clang -MMD -MP -MT out/bin/hob3l/syn.o -c -o out/bin/hob3l/syn.o src/hob3l/syn.c  -I./include -std=c11 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wundef -D_FORTIFY_SOURCE=2     -O2 -g3 -W -Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wnested-externs -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wshadow -Wdeprecated -Wconversion -Wsign-conversion -Wstrict-overflow=5 -Wshadow -Wmultichar -Wfloat-equal -Wbad-function-cast -Wredundant-decls -Wvla  -pipe -fwrapv -fstack-protector-strong -fPIE -fomit-frame-pointer  -Wno-missing-field-initializers -Wno-missing-braces   
clang -MMD -MP -MT out/bin/hob3l/syn-2scad.o -c -o out/bin/hob3l/syn-2scad.o src/hob3l/syn-2scad.c  -I./include -std=c11 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wundef -D_FORTIFY_SOURCE=2     -O2 -g3 -W -Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wnested-externs -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wshadow -Wdeprecated -Wconversion -Wsign-conversion -Wstrict-overflow=5 -Wshadow -Wmultichar -Wfloat-equal -Wbad-function-cast -Wredundant-decls -Wvla  -pipe -fwrapv -fstack-protector-strong -fPIE -fomit-frame-pointer  -Wno-missing-field-initializers -Wno-missing-braces   
clang -MMD -MP -MT out/bin/hob3l/syn-msg.o -c -o out/bin/hob3l/syn-msg.o src/hob3l/syn-msg.c  -I./include -std=c11 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wundef -D_FORTIFY_SOURCE=2     -O2 -g3 -W -Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wnested-externs -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wshadow -Wdeprecated -Wconversion -Wsign-conversion -Wstrict-overflow=5 -Wshadow -Wmultichar -Wfloat-equal -Wbad-function-cast -Wredundant-decls -Wvla  -pipe -fwrapv -fstack-protector-strong -fPIE -fomit-frame-pointer  -Wno-missing-field-initializers -Wno-missing-braces   
src/hob3l/syn-msg.c:50:38: warning: higher order bits are zeroes after implicit conversion [-Wimplicit-int-conversion]
            size_t new_x = (x + 4) & -4U;
                                   ~ ^~~
1 warning generated.
clang -MMD -MP -MT out/bin/hob3l/stl-parse.o -c -o out/bin/hob3l/stl-parse.o src/hob3l/stl-parse.c  -I./include -std=c11 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wundef -D_FORTIFY_SOURCE=2     -O2 -g3 -W -Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wnested-externs -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wshadow -Wdeprecated -Wconversion -Wsign-conversion -Wstrict-overflow=5 -Wshadow -Wmultichar -Wfloat-equal -Wbad-function-cast -Wredundant-decls -Wvla  -pipe -fwrapv -fstack-protector-strong -fPIE -fomit-frame-pointer  -Wno-missing-field-initializers -Wno-missing-braces   
clang -MMD -MP -MT out/bin/hob3l/vec3-dict.o -c -o out/bin/hob3l/vec3-dict.o src/hob3l/vec3-dict.c  -I./include -std=c11 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wundef -D_FORTIFY_SOURCE=2     -O2 -g3 -W -Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wnested-externs -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wshadow -Wdeprecated -Wconversion -Wsign-conversion -Wstrict-overflow=5 -Wshadow -Wmultichar -Wfloat-equal -Wbad-function-cast -Wredundant-decls -Wvla  -pipe -fwrapv -fstack-protector-strong -fPIE -fomit-frame-pointer  -Wno-missing-field-initializers -Wno-missing-braces   
clang -MMD -MP -MT out/bin/hob3l/scad.o -c -o out/bin/hob3l/scad.o src/hob3l/scad.c  -I./include -std=c11 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wundef -D_FORTIFY_SOURCE=2     -O2 -g3 -W -Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wnested-externs -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wshadow -Wdeprecated -Wconversion -Wsign-conversion -Wstrict-overflow=5 -Wshadow -Wmultichar -Wfloat-equal -Wbad-function-cast -Wredundant-decls -Wvla  -pipe -fwrapv -fstack-protector-strong -fPIE -fomit-frame-pointer  -Wno-missing-field-initializers -Wno-missing-braces   
clang -MMD -MP -MT out/bin/hob3l/scad-2scad.o -c -o out/bin/hob3l/scad-2scad.o src/hob3l/scad-2scad.c  -I./include -std=c11 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wundef -D_FORTIFY_SOURCE=2     -O2 -g3 -W -Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wnested-externs -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wshadow -Wdeprecated -Wconversion -Wsign-conversion -Wstrict-overflow=5 -Wshadow -Wmultichar -Wfloat-equal -Wbad-function-cast -Wredundant-decls -Wvla  -pipe -fwrapv -fstack-protector-strong -fPIE -fomit-frame-pointer  -Wno-missing-field-initializers -Wno-missing-braces   
clang -MMD -MP -MT out/bin/hob3l/csg3.o -c -o out/bin/hob3l/csg3.o src/hob3l/csg3.c  -I./include -std=c11 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wundef -D_FORTIFY_SOURCE=2     -O2 -g3 -W -Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wnested-externs -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wshadow -Wdeprecated -Wconversion -Wsign-conversion -Wstrict-overflow=5 -Wshadow -Wmultichar -Wfloat-equal -Wbad-function-cast -Wredundant-decls -Wvla  -pipe -fwrapv -fstack-protector-strong -fPIE -fomit-frame-pointer  -Wno-missing-field-initializers -Wno-missing-braces   
clang -MMD -MP -MT out/bin/hob3l/csg3-2scad.o -c -o out/bin/hob3l/csg3-2scad.o src/hob3l/csg3-2scad.c  -I./include -std=c11 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wundef -D_FORTIFY_SOURCE=2     -O2 -g3 -W -Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wnested-externs -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wshadow -Wdeprecated -Wconversion -Wsign-conversion -Wstrict-overflow=5 -Wshadow -Wmultichar -Wfloat-equal -Wbad-function-cast -Wredundant-decls -Wvla  -pipe -fwrapv -fstack-protector-strong -fPIE -fomit-frame-pointer  -Wno-missing-field-initializers -Wno-missing-braces   
clang -MMD -MP -MT out/bin/hob3l/csg2.o -c -o out/bin/hob3l/csg2.o src/hob3l/csg2.c  -I./include -std=c11 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wundef -D_FORTIFY_SOURCE=2     -O2 -g3 -W -Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wnested-externs -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wshadow -Wdeprecated -Wconversion -Wsign-conversion -Wstrict-overflow=5 -Wshadow -Wmultichar -Wfloat-equal -Wbad-function-cast -Wredundant-decls -Wvla  -pipe -fwrapv -fstack-protector-strong -fPIE -fomit-frame-pointer  -Wno-missing-field-initializers -Wno-missing-braces   
clang -MMD -MP -MT out/bin/hob3l/csg2-tree.o -c -o out/bin/hob3l/csg2-tree.o src/hob3l/csg2-tree.c  -I./include -std=c11 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wundef -D_FORTIFY_SOURCE=2     -O2 -g3 -W -Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wnested-externs -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wshadow -Wdeprecated -Wconversion -Wsign-conversion -Wstrict-overflow=5 -Wshadow -Wmultichar -Wfloat-equal -Wbad-function-cast -Wredundant-decls -Wvla  -pipe -fwrapv -fstack-protector-strong -fPIE -fomit-frame-pointer  -Wno-missing-field-initializers -Wno-missing-braces   
clang -MMD -MP -MT out/bin/hob3l/csg2-layer.o -c -o out/bin/hob3l/csg2-layer.o src/hob3l/csg2-layer.c  -I./include -std=c11 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wundef -D_FORTIFY_SOURCE=2     -O2 -g3 -W -Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wnested-externs -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wshadow -Wdeprecated -Wconversion -Wsign-conversion -Wstrict-overflow=5 -Wshadow -Wmultichar -Wfloat-equal -Wbad-function-cast -Wredundant-decls -Wvla  -pipe -fwrapv -fstack-protector-strong -fPIE -fomit-frame-pointer  -Wno-missing-field-initializers -Wno-missing-braces   
clang -MMD -MP -MT out/bin/hob3l/csg2-bool.o -c -o out/bin/hob3l/csg2-bool.o src/hob3l/csg2-bool.c  -I./include -std=c11 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wundef -D_FORTIFY_SOURCE=2     -O2 -g3 -W -Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wnested-externs -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wshadow -Wdeprecated -Wconversion -Wsign-conversion -Wstrict-overflow=5 -Wshadow -Wmultichar -Wfloat-equal -Wbad-function-cast -Wredundant-decls -Wvla  -pipe -fwrapv -fstack-protector-strong -fPIE -fomit-frame-pointer  -Wno-missing-field-initializers -Wno-missing-braces   
src/hob3l/csg2-bool.c:55:29: error: typedef redefinition with different types ('cp_csg2_bool_mode_t' vs '__darwin_mode_t' (aka 'unsigned short'))
typedef cp_csg2_bool_mode_t mode_t;
                            ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types/_mode_t.h:31:33: note: previous definition is here
typedef __darwin_mode_t         mode_t;
                                ^
src/hob3l/csg2-bool.c:576:29: warning: implicit conversion loses integer precision: 'cp_csg2_bool_mode_t' to 'mode_t' (aka 'unsigned short') [-Wimplicit-int-conversion]
    flatten_eager(tmp, &ol, mode);
    ~~~~~~~~~~~~~           ^~~~
src/hob3l/csg2-bool.c:649:5: warning: array index 2 is past the end of the array (which contains 2 elements) [-Warray-bounds]
    cp_v_init0(&r->z, cnt);
    ^~~~~~~~~~~~~~~~~~~~~~
./include/hob3lbase/vec.h:89:5: note: expanded from macro 'cp_v_init0'
    cp_v_init0_1_(CP_GENSYM(_szYF), CP_GENSYM(_vecYF), (vec), (sz))
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/hob3lbase/vec.h:95:9: note: expanded from macro 'cp_v_init0_1_'
        cp_v_init0_alloc(&cp_alloc_global, vec, sz); \
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/hob3lbase/vec.h:70:9: note: expanded from macro 'cp_v_init0_alloc'
        CP_GENSYM(_vecNX), (m), (vec), (sz))
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
note: (skipping 3 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
./include/hob3ldef/def.h:76:27: note: expanded from macro 'CP_CONCAT_3_'
#define CP_CONCAT_3_(x,y) x##y
                          ^
<scratch space>:251:1: note: expanded from here
_vecNX649
^
./include/hob3lbase/vec.h:81:13: note: expanded from macro 'cp_v_init0_alloc_1_'
            vec->word[2] = sz; \
            ^         ~
./include/hob3lbase/vec_tam.h:35:9: note: array 'word' declared here
typedef CP_ARR_T(double) cp_a_double_t;
        ^
./include/hob3lbase/vec_tam.h:18:9: note: expanded from macro 'CP_ARR_T'
        size_t word[2]; \
        ^
src/hob3l/csg2-bool.c:652:5: warning: array index 2 is past the end of the array (which contains 2 elements) [-Warray-bounds]
    cp_v_init0(&r->flag, cnt);
    ^~~~~~~~~~~~~~~~~~~~~~~~~
./include/hob3lbase/vec.h:89:5: note: expanded from macro 'cp_v_init0'
    cp_v_init0_1_(CP_GENSYM(_szYF), CP_GENSYM(_vecYF), (vec), (sz))
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/hob3lbase/vec.h:95:9: note: expanded from macro 'cp_v_init0_1_'
        cp_v_init0_alloc(&cp_alloc_global, vec, sz); \
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/hob3lbase/vec.h:70:9: note: expanded from macro 'cp_v_init0_alloc'
        CP_GENSYM(_vecNX), (m), (vec), (sz))
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
note: (skipping 3 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
./include/hob3ldef/def.h:76:27: note: expanded from macro 'CP_CONCAT_3_'
#define CP_CONCAT_3_(x,y) x##y
                          ^
<scratch space>:300:1: note: expanded from here
_vecNX652
^
./include/hob3lbase/vec.h:81:13: note: expanded from macro 'cp_v_init0_alloc_1_'
            vec->word[2] = sz; \
            ^         ~
./include/hob3lbase/vec_tam.h:36:9: note: array 'word' declared here
typedef CP_ARR_T(size_t) cp_a_size_t;
        ^
./include/hob3lbase/vec_tam.h:18:9: note: expanded from macro 'CP_ARR_T'
        size_t word[2]; \
        ^
3 warnings and 1 error generated.
make: *** [out/bin/hob3l/csg2-bool.o] Error 1

from hob3l.

GabrieleMoretti avatar GabrieleMoretti commented on July 24, 2024

The files now are in the directory but there's a new error:
error: typedef redefinition with different types ('cp_csg2_bool_mode_t' vs '__darwin_mode_t' (aka 'unsigned short'))

from hob3l.

virtualritz avatar virtualritz commented on July 24, 2024

I forked the repository and tried a fix for this. But there may be more bubbling up, after.

In the meantime, remove the hob3l folder again and clone my fork:

git clone https://github.com/virtualritz/hob3l.git
cd hob3l
make

No need to edit the Makefile again, I did the swap of gcc for clang in my fork already for you.

from hob3l.

GabrieleMoretti avatar GabrieleMoretti commented on July 24, 2024

Now I could compile hob3l and it runs. Unfortunately It looks like there are some issues with fonts.
OpenScad created a .csg file (opening it in openScad it's perfect) but when I run hob3l myfile.csg -o myfile.stl it doesn't work (creates myfile.stl with size zero):


MacBook-Pro-3:hob3l gabrielemoretti$ /Applications/OpenSCAD.app/Contents/MacOS/OpenSCAD /Users/gabrielemoretti/Dropbox/Dati/MECOM/Progetti/9x9x9.space/MxMxM_Studio_6/SEQ_REBECCA_001/myfile.scad -o /Users/gabrielemoretti/Dropbox/Dati/MECOM/Progetti/9x9x9.space/MxMxM_Studio_6/SEQ_REBECCA_001/myfile.csg
MacBook-Pro-3:hob3l gabrielemoretti$ out/bin/hob3l.x /Users/gabrielemoretti/Dropbox/Dati/MECOM/Progetti/9x9x9.space/MxMxM_Studio_6/SEQ_REBECCA_001/myfile.csg -o /Users/gabrielemoretti/Dropbox/Dati/MECOM/Progetti/9x9x9.space/MxMxM_Studio_6/SEQ_REBECCA_001/myfile.stl
/Users/gabrielemoretti/Dropbox/Dati/MECOM/Progetti/9x9x9.space/MxMxM_Studio_6/SEQ_REBECCA_001/myfile.csg:5:200: Warning: Unknown parameter name '$fn'. Ignoring.
                 text(text = "SEQ_REBECCA 001", size = 6, spacing = 1, font = "Futura Condensed Bold", direction = "ltr", language = "en", script = "Latn", halign = "center", valign = "center", $fn = 0, $fa = 12, $fs = 2);
                                                                                                                                                                                                        ^
/Users/gabrielemoretti/Dropbox/Dati/MECOM/Progetti/9x9x9.space/MxMxM_Studio_6/SEQ_REBECCA_001/myfile.csg:12:175: Warning: Unknown parameter name '$fn'. Ignoring.
                 text(text = "2020-03", size = 6, spacing = 1, font = "Futura Condensed Bold", direction = "ltr", language = "en", halign = "center", valign = "center", $fn = 0, $fa = 12, $fs = 2);
                                                                                                                                                                               ^
/Users/gabrielemoretti/Dropbox/Dati/MECOM/Progetti/9x9x9.space/MxMxM_Studio_6/SEQ_REBECCA_001/myfile.csg:19:192: Warning: Unknown parameter name '$fn'. Ignoring.
                 text(text = "R01 C01", size = 6, spacing = 1, font = "Futura Condensed Bold", direction = "ltr", language = "en", script = "Latn", halign = "center", valign = "center", $fn = 0, $fa = 12, $fs = 2);
                                                                                                                                                                                                ^
Info: Z: min=1.7, step=0.2, layer_cnt=10, max=3.5, grid=2^13
Segmentation fault: 11

from hob3l.

GabrieleMoretti avatar GabrieleMoretti commented on July 24, 2024

I also tried to convert the test file body.scad and obtained a similar result:

MacBook-Pro-3:hob3l gabrielemoretti$ out/bin/hob3l.x /Users/gabrielemoretti/Dropbox/Dati/MECOM/Progetti/9x9x9.space/MxMxM_Studio_6/SEQ_REBECCA_001/body.scad -o /Users/gabrielemoretti/Dropbox/Dati/MECOM/Progetti/9x9x9.space/MxMxM_Studio_6/SEQ_REBECCA_001/body.stl
Info: Z: min=0.1, step=0.2, layer_cnt=152, max=30.3, grid=2^13
Segmentation fault: 11

from hob3l.

virtualritz avatar virtualritz commented on July 24, 2024

What you ran into is an issue in the myfile.csg. The variable $fn is not defined.

But the segmentation fault is something else. That is either something related to your input files or a platform-specific bug in hob3l that only shows on macOS.

Can you share any of those two files?

from hob3l.

GabrieleMoretti avatar GabrieleMoretti commented on July 24, 2024

myfile.scad.zip
myfile.csg.zip

from hob3l.

GabrieleMoretti avatar GabrieleMoretti commented on July 24, 2024

I agree that the big issue is the Segmentation fault 11. Through your help I'm understanding better the parameters of your application...

from hob3l.

virtualritz avatar virtualritz commented on July 24, 2024

Through your help I'm understanding better the parameters of your application...

This is not my application. I have never even used hob3l. šŸ˜Š
I just happen to watch this repositoy as I find the implementation interesting. So I saw your call for help and it was xmas ...

The author of hob3l is @moehriegitt.

from hob3l.

virtualritz avatar virtualritz commented on July 24, 2024

myfile.scad.zip
myfile.csg.zip

Both files can be sliced just fine under Linux on my laptop. I.e. no segmentation fault.

I created a new issue (#11).

If you want to pursue this further I'd suggest a different approach. Drop me a PM via the email in my GH profile.

from hob3l.

moehriegitt avatar moehriegitt commented on July 24, 2024

OK, thanks for reporting. I will check out the clang/macos compile problems, too, and fix it in this repo. Just give me a bit of time.

from hob3l.

virtualritz avatar virtualritz commented on July 24, 2024

OK, thanks for reporting. I will check out the clang/macos compile problems, too, and fix it in this repo. Just give me a bit of time.

See my fork for the 'fix' to make it build with clang on macOS for Gabriele.

from hob3l.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    šŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. šŸ“ŠšŸ“ˆšŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ā¤ļø Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.