Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build fails with GCC compiler on macOS #374

Closed
laurynas-biveinis opened this issue Mar 24, 2021 · 5 comments
Closed

Build fails with GCC compiler on macOS #374

laurynas-biveinis opened this issue Mar 24, 2021 · 5 comments

Comments

@laurynas-biveinis
Copy link

With brew-installed GCC 10:

deepstate/build$ cmake .. -DCMAKE_C_COMPILER=gcc-10 -DCMAKE_CXX_COMPILER=g++-10
-- The C compiler identification is GNU 10.2.0
-- The CXX compiler identification is GNU 10.2.0
...
-- Build files have been written to: /Users/laurynas/unodb/deepstate/build
deepstate/build$ make
...
[ 14%] Building C object CMakeFiles/deepstate32.dir/src/lib/DeepState.c.o
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/string.h:194,
                 from /Users/laurynas/unodb/deepstate/src/include/deepstate/DeepState.h:30,
                 from /Users/laurynas/unodb/deepstate/src/lib/DeepState.c:17:
/Users/laurynas/unodb/deepstate/src/lib/DeepState.c: In function 'DeepState_NewSwarmConfig':
/Users/laurynas/unodb/deepstate/src/lib/DeepState.c:411:3: warning: '__builtin_strncpy' specified bound depends on the length of the source argument [-Wstringop-overflow=]
  411 |   strncpy(new_config->file, file, strlen(file));
      |   ^~~~~~~
/Users/laurynas/unodb/deepstate/src/lib/DeepState.c:411:3: note: length computed here
/var/folders/t2/k0br2w_j78zdnf6gnz5b4xgr0000gn/T//ccSqlfhx.s:76:2: error: instruction requires: Not 64-bit mode
        pushl   %esi
        ^
... thousands of similar errors omitted ...
/var/folders/t2/k0br2w_j78zdnf6gnz5b4xgr0000gn/T//ccSqlfhx.s:17535:2: error: instruction requires: Not 64-bit mode
        pushl   %eax
        ^
make[2]: *** [CMakeFiles/deepstate32.dir/src/lib/DeepState.c.o] Error 1
make[1]: *** [CMakeFiles/deepstate32.dir/all] Error 2
make: *** [all] Error 2
@agroce agroce closed this as completed in f0450d6 Apr 24, 2021
@agroce
Copy link
Collaborator

agroce commented Apr 24, 2021

Not just a warning, it's actually a real bug as @kosak pointed out in another channel to me.

@laurynas-biveinis
Copy link
Author

laurynas-biveinis commented Apr 26, 2021

@agroce the rest of the build errors past the fixed issue remain:

/var/folders/t2/k0br2w_j78zdnf6gnz5b4xgr0000gn/T//cchmmGsC.s:76:2: error: instruction requires: Not 64-bit mode
        pushl   %esi
        ^
/var/folders/t2/k0br2w_j78zdnf6gnz5b4xgr0000gn/T//cchmmGsC.s:78:2: error: instruction requires: Not 64-bit mode
        pushl   %ebx
        ^
/var/folders/t2/k0br2w_j78zdnf6gnz5b4xgr0000gn/T//cchmmGsC.s:87:2: error: instruction requires: Not 64-bit mode
        pushl   %esi
        ^
...

Should I open a new issue for this one?

@agroce
Copy link
Collaborator

agroce commented Apr 26, 2021

Yes, and maybe you can attach a file with the full failing compile?

@laurynas-biveinis
Copy link
Author

@agroce done, #387

@laurynas-biveinis
Copy link
Author

Wait a sec, the build log for #387 and this issue is exactly the same (except for the line numbers) - including the warning which was supposed to be fixed in f0450d6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants