Navigation Menu

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

make fails on 10.14.6 ("has __UNIXSTACK, but wrong ::maxprot (should be 7)") #3

Closed
dominiquelee opened this issue Feb 13, 2020 · 13 comments
Labels
bug Something isn't working

Comments

@dominiquelee
Copy link

On a Mojave 10.14.6, building the current master (a8e2879) with

./autogen.sh 
./configure --prefix=/usr/local/valgrind/bin --enable-only64bit
make

results in

Making all in memcheck
Making all in .
../coregrind/link_tool_exe_darwin 0x158000000 gcc     -o memcheck-amd64-darwin   -arch x86_64 -O2 -g -Wall -Wmissing-prototypes -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations -Wcast-align -Wcast-qual -Wwrite-strings -Wempty-body -Wformat -Wformat-security -Wignored-qualifiers -Wenum-conversion -finline-functions -fno-stack-protector -fno-strict-aliasing -fno-builtin -Wno-cast-align -Wno-self-assign -Wno-tautological-compare -mmacosx-version-min=10.6 -O2 -nodefaultlibs -nostartfiles -Wl,-u,__start -Wl,-e,__start -arch x86_64 memcheck_amd64_darwin-mc_leakcheck.o memcheck_amd64_darwin-mc_malloc_wrappers.o memcheck_amd64_darwin-mc_main.o memcheck_amd64_darwin-mc_main_asm.o memcheck_amd64_darwin-mc_translate.o memcheck_amd64_darwin-mc_machine.o memcheck_amd64_darwin-mc_errors.o ../coregrind/libcoregrind-amd64-darwin.a ../VEX/libvex-amd64-darwin.a -lgcc 
link_tool_exe_darwin: /usr/bin/ld -static -arch x86_64 -macosx_version_min 10.6 -o memcheck-amd64-darwin -u __start -e __start -image_base 0x158000000 -stack_addr 0x154000000 -stack_size 0x800000 memcheck_amd64_darwin-mc_leakcheck.o memcheck_amd64_darwin-mc_malloc_wrappers.o memcheck_amd64_darwin-mc_main.o memcheck_amd64_darwin-mc_main_asm.o memcheck_amd64_darwin-mc_translate.o memcheck_amd64_darwin-mc_machine.o memcheck_amd64_darwin-mc_errors.o ../coregrind/libcoregrind-amd64-darwin.a ../VEX/libvex-amd64-darwin.a
link_tool_exe_darwin: ../coregrind/fixup_macho_loadcmds 0x154000000 0x800000 memcheck-amd64-darwin
fixup_macho_loadcmds: requested stack_addr (top) 0x154000000, stack_size 0x800000
fixup_macho_loadcmds: examining tool exe: memcheck-amd64-darwin
fixup_macho_loadcmds:   initial RSP is as expected (0x154000000)
fixup_macho_loadcmds: fail: has __UNIXSTACK, but wrong ::maxprot (should be 7)
make[3]: *** [memcheck-amd64-darwin] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
@LouisBrunner
Copy link
Owner

@dominiquelee, thanks for your report, it was reported on the bugtracker (https://bugs.kde.org/show_bug.cgi?id=399584) but it might be easier to debug here.

I am using 10.14.6 as well and I don't get this issue. The problem should be fairly easy to fix but I want to be sure of what is going on.

Could you please paste the output of ./configure?

@LouisBrunner LouisBrunner added the bug Something isn't working label Feb 14, 2020
@dominiquelee
Copy link
Author

Sure.
./configure --prefix=/usr/local/valgrind/bin --enable-only64bit
configureOutput.txt

@LouisBrunner
Copy link
Owner

Thanks, it is what I thought. I am finalising some other work and I will get on right after.

@LouisBrunner LouisBrunner pinned this issue Feb 17, 2020
@LouisBrunner
Copy link
Owner

Could you try the feature/xcode_check branch?

@Akylzhan
Copy link

Akylzhan commented Feb 18, 2020

@LouisBrunner , I have another error, even with xcode_check branch

Making all in coregrind
(cd m_mach && mig /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/mach/mach_vm.defs 
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/mach/task.defs 
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/mach/thread_act.defs 
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/mach/vm_map.defs)

"/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/mach/task.defs", line 509: type 'task_exc_guard_behavior_t' not defined
mig: fatal: "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/mach/task.defs", line 509: 1 errors found. Abort.

make[2]: *** [m_mach/mach_vmUser.c] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Here is the output of ./configure command:
configure_output.txt

@dominiquelee
Copy link
Author

On my side, it's indeed working fine. I guess it's worth adding I have Xcode 11.3.1 (11C504).
Thanks for the debugging!

@LouisBrunner
Copy link
Owner

@dominiquelee, thanks for the confirmation!

@Akylzhan, I have run into a similar issue before, I think it was linked to a setup issue.
Can you check if /usr/include/mach/ still exist on your system?
If you could run env and post the result, that might also be helpful.
Moreover, looking at your configure output, it seems to be picking up gcc-9 instead of clang (as it seems like it is coming from brew, you can do brew unlink gcc while configuring and then brew link gcc to restore to the previous setup).

@Akylzhan
Copy link

Akylzhan commented Feb 20, 2020

Thank you very much for responding

There is such directory in "Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/"
But there is no /usr/include
Output of env:

TERM_PROGRAM=Apple_Terminal
SHELL=/bin/bash
TERM=xterm-256color
TMPDIR=/var/folders/5y/wfg26j6x6s3cgb3rw0l_lpsh0000gn/T/
Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.pq6n7rf0Jx/Render
TERM_PROGRAM_VERSION=421.2
OLDPWD=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include
TERM_SESSION_ID=E09A1988-6175-487D-8754-7F8AC75A10AC
USER=akylzhansauranbay
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.8NmLNatxgp/Listeners
PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
HOMEBREW_EDITOR=/usr/bin/vim
PWD=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/mach
XPC_FLAGS=0x0
XPC_SERVICE_NAME=0
SHLVL=1
HOME=/Users/akylzhansauranbay
LOGNAME=akylzhansauranbay
LC_CTYPE=UTF-8
_=/usr/bin/env

@LouisBrunner
Copy link
Owner

@Akylzhan, let's try the gcc route then. I forgot that you don't need to disable/remove your extra gcc, you can just force configure to find the right one, just run CC=/usr/bin/gcc ./configure

@Akylzhan
Copy link

@LouisBrunner the same error occurred

@LouisBrunner
Copy link
Owner

@Akylzhan I'll need the configure output again to know what is going on

@Akylzhan
Copy link

@LouisBrunner thanks for the support, now I have tried to install it again and valgrind installs with brew, but the new problem occurred when I used valgrind to check for mem.leaks in empty c++ executable and it shows many definitely lost leaks

@LouisBrunner
Copy link
Owner

@Akylzhan That's a different problem, please create a new issue including the output of valgrind, what was expected, etc.

@LouisBrunner LouisBrunner unpinned this issue Apr 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants