LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   valgrind cannot build in lion(10.8) (https://www.linuxquestions.org/questions/programming-9/valgrind-cannot-build-in-lion-10-8-a-4175458588/)

xtophertaito 04-18-2013 03:10 AM

valgrind cannot build in lion(10.8)
 
I am install valgrind and got this with make command:


m_ume/macho.c: In function ‘load_thin_file’:
m_ume/macho.c:562: error: ‘LC_MAIN’ undeclared (first use in this function)
m_ume/macho.c:562: error: (Each undeclared identifier is reported only once
m_ume/macho.c:562: error: for each function it appears in.)
m_ume/macho.c:569: error: dereferencing pointer to incomplete type
make[3]: *** [libcoregrind_amd64_darwin_a-macho.o] Error 1
make[2]: *** [install] Error 2
make[1]: *** [install-recursive] Error 1
make: *** [install] Error 2
Thx

NevemTeve 04-18-2013 09:43 AM

Exactly what did you download, from where, how did you run ./configure, what platform do you have... Not everyone here is mind-reader.

Just for the record: valgind-3.8.1 doesn't compile for me either (x86_64, Debian-6.0.5, gcc 4.4.5)
Code:

gcc -Wno-long-long  -Wno-pointer-sign -fno-stack-protector \
              -Wbad-function-cast -Wcast-qual -Wcast-align -fstrict-aliasing \
              -m64 -mpreferred-stack-boundary=2 -O2 -g -Wall -Wmissing-prototypes -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations -Wno-format-zero-length -fno-strict-aliasing -fno-builtin -fomit-frame-pointer \
                                -O -S -o auxprogs/genoffsets.s \
                                        auxprogs/genoffsets.c
auxprogs/genoffsets.c:1: error: -mpreferred-stack-boundary=2 is not between 4 and 12


xtophertaito 04-18-2013 12:13 PM

here is website i use:http://prateekvjoshi.wordpress.com
How to install valgrind on mac.
I kick-start:
>> cd valgrind
>> ./autogen.sh
>> ./configure
>> make
>> sudo make install

My os is 10.8,x86/64 bit.I installed gcc and Xcode with CLT.The are all fine.
Every step was cool until make command.I wasted all time searching internet
without success.
Please can you suggest the way forward.
thx

NevemTeve 04-18-2013 12:51 PM

It is not clear to me where LC_MAIN should come from (not from valgrind itself).
If I were you, I'd change line 561 in the mentioned file:

Code:

old:#if  DARWIN_VERS == DARWIN_10_8
new:#if  DARWIN_VERS == DARWIN_10_8 && defined(LC_MAIN)



All times are GMT -5. The time now is 08:31 AM.