Can't get rid of "value has been optimized out" in GDB - gcc

I am debugging the CPython executable by GDB and can't get the value of some variables despite of disabling all GCC optimizations:
(gdb) print *co
value has been optimized out
(gdb) frame
#0 _PyEval_EvalFrameDefault (
f=Frame 0x7ffff7f36050, for file <frozen importlib._bootstrap>, line 8, in <module> (),
throwflag=<optimized out>) at Python/ceval.c:1057
1057 switch (opcode) {
(gdb) info locals
stack_pointer = 0x7ffff7f361c8
next_instr = 0x555555aff422
opcode = 100
oparg = 0
fastlocals = 0x7ffff7f361c8
freevars = <optimized out>
retval = 0x0
tstate = <optimized out>
co = <optimized out>
instr_ub = -1
instr_lb = 0
instr_prev = -1
first_instr = <optimized out>
names = <optimized out>
consts = <optimized out>
... <output cropped>
OS: Ubuntu 18.04.2 LTS
CPython version: 3.8.0a
Compiled by: GCC 7.3.0 on Linux
Debugger: GNU gdb (Ubuntu 8.1-0ubuntu3) 8.1.0.20180409-git
Firstly, I did the usual compilation with --with-pydebug option.
./configure --with-pydebug
make -s -j
It should preserve all values for debugger but it doesn't.
I have read, that the cause of this problem is the compiler optimization, so I decided to disable it completely.
For this I changed relevant lines in the configure script from:
# Optimization messes up debuggers, so turn it off for
# debug builds.
if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
OPT="-g -Og -Wall"
else
OPT="-g -O0 -Wall"
fi
to:
# Optimization messes up debuggers, so turn it off for
# debug builds.
# if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
# OPT="-g -Og -Wall"
# else
# OPT="-g -O0 -Wall"
# fi
OPT="-g -O0 -Wall"
The resulting optimization options in the Makefile are:
$ grep -- '-O' Makefile
OPT= -g -O0 -Wall
$(MAKE) all CFLAGS="$(CFLAGS) -O0 -pg -fprofile-arcs -ftest-coverage" LIBS="$(LIBS) -lgcov"
$(PYTHON_FOR_BUILD) -Wi -O $(DESTDIR)$(LIBDEST)/compileall.py \
$(PYTHON_FOR_BUILD) -Wi -OO $(DESTDIR)$(LIBDEST)/compileall.py \
$(PYTHON_FOR_BUILD) -Wi -O $(DESTDIR)$(LIBDEST)/compileall.py \
$(PYTHON_FOR_BUILD) -Wi -OO $(DESTDIR)$(LIBDEST)/compileall.py \
Also, didn't help.
The question: Why "the value has been optimized out" persists even with the compiler optimization disabled and how can I overcome this problem?
EDIT
(gdb) info sharedlibrary
From To Syms Read Shared Object Library
0x00007ffff7dd5f10 0x00007ffff7df4b20 Yes /lib64/ld-linux-x86-64.so.2
0x00007ffff7bbbbb0 0x00007ffff7bca0f1 Yes /lib/x86_64-linux-gnu/libpthread.so.0
0x00007ffff79b2e50 0x00007ffff79b3bde Yes /lib/x86_64-linux-gnu/libdl.so.2
0x00007ffff77afe70 0x00007ffff77b093a Yes /lib/x86_64-linux-gnu/libutil.so.1
0x00007ffff741ca80 0x00007ffff74db2f5 Yes /lib/x86_64-linux-gnu/libm.so.6
0x00007ffff70412d0 0x00007ffff71b9c3c Yes /lib/x86_64-linux-gnu/libc.so.6

Related

Building kernel module: `.ko` not built

I'm trying to package a driver. However, when I compile the driver I don't get the output file CorXtiumCLMX4k.ko as expected, while the Makefile does contain the lines:
obj-m := CorXtiumCLMX4k.o
CorXtiumCLMX4k-objs := $(GDRV_OBJS) $(TARGETLIB)
(Btw any idea what this -objs is for? In the kernel documentation they mention the prefix -y… but I also tried it without success)
The compilation does not give any error at that step… just no .ko file is produced:
salsera_xtium> make: Entering directory '/build/va8hwnknyg6cgzqydl3gm64j8z0vyq2i-source/DALSA/src/xtium/xtium_cl_mx4/driver/kernel/linux'
salsera_xtium> make -C /nix/store/n862ppa5sy8bmnhs801cskcisd6z7fd0-linux-5.4.225-dev/lib/modules/5.4.225/build M=/build/va8hwnknyg6cgzqydl3gm64j8z0vyq2i-source/DALSA/src/xtium/xtium_cl_mx4/driver/kernel/linux IROOT=/build/va8hwnknyg6cgzqydl3gm64j8z0vyq2i-source/DALSA/src/xtium/xtium_cl_mx4/driver/kernel/linux/../../../../.. modules
salsera_xtium> make[1]: Entering directory '/nix/store/n862ppa5sy8bmnhs801cskcisd6z7fd0-linux-5.4.225-dev/lib/modules/5.4.225/build'
salsera_xtium> CC [M] /build/va8hwnknyg6cgzqydl3gm64j8z0vyq2i-source/DALSA/src/xtium/xtium_cl_mx4/driver/kernel/linux/GDrv_Linux.o
salsera_xtium> CC [M] /build/va8hwnknyg6cgzqydl3gm64j8z0vyq2i-source/DALSA/src/xtium/xtium_cl_mx4/driver/kernel/linux/GDrv_LinuxUtil.o
salsera_xtium> CC [M] /build/va8hwnknyg6cgzqydl3gm64j8z0vyq2i-source/DALSA/src/xtium/xtium_cl_mx4/driver/kernel/linux/GDrv_Util.o
salsera_xtium> CC [M] /build/va8hwnknyg6cgzqydl3gm64j8z0vyq2i-source/DALSA/src/xtium/xtium_cl_mx4/driver/kernel/linux/memmanag.o
salsera_xtium> make[1]: Leaving directory '/nix/store/n862ppa5sy8bmnhs801cskcisd6z7fd0-linux-5.4.225-dev/lib/modules/5.4.225/build'
salsera_xtium> make: Leaving directory '/build/va8hwnknyg6cgzqydl3gm64j8z0vyq2i-source/DALSA/src/xtium/xtium_cl_mx4/driver/kernel/linux'
salsera_xtium> cp: cannot stat '/build/va8hwnknyg6cgzqydl3gm64j8z0vyq2i-source/DALSA/src/xtium/xtium_cl_mx4/driver/kernel/linux/CorXtiumCLMX4k.ko': No such file or directory
(note that make takes /nix/…/lib instead of /lib because I'm using Nix so I patched the path accordingly… also I do compile before other libraries that are not shown in this log, see below)
Any idea what could go wrong? I tried to compile with kernel 5.4 (supposed to be supported according to the doc…) and a more recent kernel, none of them work.
Debug informations
If it can be of any help, here is the list of files in the current folder before the compilation starts:
copysources corenv.h CorXtiumCLMX4k26_x86_64_a gdrv.h GDrv_kernel.h GDrv_KernelThread.h GDrv_Linux.c GDrv_LinuxUtil.c GDrv_LinuxUtil.h GDrv_OS.h GDrv_Util.c Makefile sdrv.h sources
At the end, I have:
copysources cormgrlibk.c gdrv.h GDrv_KernelThread.h GDrv_LinuxUtil.c GDrv_OS.h Makefile Module.symvers serialk.c
corenv.h CorXtiumCLMX4k26_x86_64_a GDrv_kernel.h GDrv_Linux.c GDrv_LinuxUtil.h GDrv_Util.c memmanag.c sdrv.h sources
The file CorXtiumCLMX4k26_x86_64_a seems to be some sort of static binary blob:
$ file CorXtiumCLMX4k26_x86_64_a
CorXtiumCLMX4k26_x86_64_a: ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), with debug_info, not stripped
$ ldd CorXtiumCLMX4k26_x86_64_a
ldd: warning: you do not have execution permission for `./CorXtiumCLMX4k26_x86_64_a'
not a dynamic executable
(note that I also tried to rename it as CorXtiumCLMX4k.o_shipped with 'TARGETLIB = CorXtiumCLMX4k.o' without success)
Note that latter in the build process (yeah, it continues even after errors), I also get an error:
salsera_xtium> /nix/store/039g378vc3pc3dvi9dzdlrd0i4q93qwf-binutils-2.39/bin/ld: warning: /build/va8hwnknyg6cgzqydl3gm64j8z0vyq2i-source/DALSA/Xtium-CL_MX4/lib/libXtiumCLMX4L_1_0_a has a section extending past end of file
salsera_xtium> /nix/store/039g378vc3pc3dvi9dzdlrd0i4q93qwf-binutils-2.39/bin/ld: error: /build/va8hwnknyg6cgzqydl3gm64j8z0vyq2i-source/DALSA/Xtium-CL_MX4/lib/libXtiumCLMX4L_1_0_a: ELF section name out of range
but I'm not sure if this error is because I'm missing some compilation flags like pic, if the file is just bad, or if it's just that I first need to compile the .ko file properly…
the Makefile looks like:
#-----------------------------------------------------------------------------
# MAKEFILE
# Copyright(C) Teledyne DALSA Inc 2015
# All rights reserved.
#
# Description:
# Makefile for distributed version of the CorXtiumCLMX4 kernel module for Linux
#
#-----------------------------------------------------------------------------
#
# Determine the kernel version being compiled for.
CORKERNEL_MAJOR:=$(shell uname -r | cut -d '.' -f 1)
CORKERNEL_MINOR:=$(shell uname -r | cut -d '.' -f 2)
#
# Kernel version-specific dependencies
# (mainly needed for 2.4 kernel support).
#
ifeq ($(CORKERNEL_MAJOR), 2)
ifeq ($(CORKERNEL_MINOR), 6)
# 2.6 kernel
TARGET_OPTIONS = -DHOSTPC -DPOSIX_HOSTPC -DNEW_CXM_INTERFACE -DEXPORT_SYMTAB
#TARGET_OPTIONS = -DHOSTPC -DPOSIX_HOSTPC -DNEW_CXM_INTERFACE -DEXPORT_SYMTAB -DDEBUG_PRINT
SAPSRCROOT := $(IROOT)/sapera
else
# Not 2.6 kernel - not supported (PCIe hardware).
$(error $(shell echo "Kernel version must be 2.6 or higher to support PCIe hardware"))
endif
else ifeq ($(CORKERNEL_MAJOR), 3)
# 2.6 (or higher kernel)
TARGET_OPTIONS = -DHOSTPC -DPOSIX_HOSTPC -DNEW_CXM_INTERFACE -DEXPORT_SYMTAB
#TARGET_OPTIONS = -DHOSTPC -DPOSIX_HOSTPC -DNEW_CXM_INTERFACE -DEXPORT_SYMTAB -DDEBUG_PRINT
SAPSRCROOT := $(IROOT)/sapera
endif
#
# API Version control information to be embedded.
#
ifndef CORARCH
CORARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/x86_64/x86_64/ )
endif
TARGETNAME = CorXtiumCLMX4k
TARGET = $(TARGETNAME).ko
ifeq ($(CORARCH), x86_64)
TARGETLIB = $(TARGETNAME)26_x86_64_a
CORARCH_OPTIONS= -Dx86_64
else
TARGETLIB = $(TARGETNAME)26_i386_a
CORARCH_OPTIONS= -D__i386__
endif
#
# Include Path for the kernel module.
#
I_CORSERIALCOMMON= $(SAPSRCROOT)/driver/corserial/linux/common
CORSERIALDEV= $(SAPSRCROOT)/driver/corserial/linux/kernel
CORMGRK= $(SAPSRCROOT)/driver/cormanager/kernel
XCELERA_HS_PX8_INC= $(IROOT)/xtium/xtium_cl_mx4/include
CURDIR = $(IROOT)/xtium/xtium_cl_mx4/driver/kernel/linux
INC_COMMON_PATH = -I$(CURDIR) -I$(KERNEL_INCLUDEDIR) -I$(CURDIR) -I$(SAPSRCROOT)/include \
-I$(XCELERA_HS_PX8_INC) -I$(CORMGRK) -I$(I_CORSERIALCOMMON) -I$(CORSERIALDEV)
DISTINSTALLDIR=$(IROOT)/../Xtium-CL_MX4/bin
RUNNINGKERNEL=$(shell uname -r)
INSTALLDIR= /lib/modules/$(RUNNINGKERNEL)/misc
#
# Source Path for the kernel module.
#
#
# Object definitions: Specific files for this library.
# GDrv objects.
GDRV_OBJS = GDrv_Linux.o \
GDrv_LinuxUtil.o \
GDrv_Util.o \
memmanag.o \
cormgrlibk.o \
serialk.o
#
# 2.6 kernel build section
#
INC_PATH = -I$(CURDIR) $(INC_COMMON_PATH)
CFLAGS_MODULE += $(INC_PATH) $(TARGET_OPTIONS) $(CORKERNEL_CONFIG_OPTIONS) \
$(CORARCH_OPTIONS)
EXTRA_CFLAGS += -Wno-parentheses -Wno-missing-braces -Wno-unknown-pragmas \
-Wno-cast-qual -Wno-unused-function -Wno-unused-label
#
# As of kernel 2.6.28 (and later) - versioned module symbol dependencies need to be specified
# explicitly - using absolute paths - to the Module.symvers files for the modules whose
# symbols we depend on.
# (Actually broken in an early 2.6.28 but later fixed).
#
# Prior to 2.6.28 - the kernel build system and module loader would resolve all symbols automatically
#
CORKVER := $(shell uname -r | cut -d '.' -f 3)
CORKTEMP := 28
COMPAREKVER := $(shell echo ${CORKVER}\>=${CORKTEMP} | bc )
ifeq ($(COMPAREKVER),1)
KBUILD_EXTRA_SYMBOLS= $(CORMGRK)/Module.symvers $(CORSERIALDEV)/Module.symvers
else
$(shell cat $(CORMGRK)/Module.symvers > $(CURDIR)/Module.symvers)
$(shell cat $(CORSERIALDEV)/Module.symvers >> $(CURDIR)/Module.symvers)
endif
#
# 2.6 kernel build section
#
ifneq ($(KERNELRELEASE),)
obj-m := CorXtiumCLMX4k.o
CorXtiumCLMX4k-objs := $(GDRV_OBJS) $(TARGETLIB)
#
# Perform any specific kernel configuration difference checks.
#
CORKERNEL_INCLUDEDIR = /lib/modules/$(shell uname -r)/build/include
ifeq ($(shell $(SAPSRCROOT)/corcfgtest.sh remap_pfn_range $(CORKERNEL_INCLUDEDIR)),1)
CORKERNEL_CONFIG_OPTIONS += -DUSE_REMAP_PFN_RANGE
endif
else
KERNELDIR ?= /lib/modules/$(shell uname -r)/build
PWD := $(shell pwd)
RES := $(shell ./copysources)
default:
$(MAKE) -C $(KERNELDIR) M=$(PWD) IROOT=$(PWD)/../../../../.. modules
endif
all: $(TARGET)
clean:
-$(RM) $(OBJS) $(GDRV_OBJS) $(TARGET)
distclean:
-$(RM) $(OBJS) $(GDRV_OBJS)
install: all
cp $(TARGET) $(INSTALLDIR)
distinstall: all
cp $(TARGET) $(DISTINSTALLDIR)
(note that I also tried to turn else ifeq ($(CORKERNEL_MAJOR), 3) in else since kernel 5 is bigger than kernel 3… still no success).
If you want the full compilation log (including the sub libraries), see here.

Gfortran compiling error after replacing with f77

QI need to compile some files using gfortran. I went to the makefile and replaced all the "f77" with "gfortran". However I get this error when I do "make"
gfortran -c verbal.f
gfortran -c trgl6_octa.f
gfortran -c trgl6_icos.f
gfortran -c gauss_trgl.f
gfortran -c gauss_leg.f
gfortran -c sgf_3d_fs.f
gfortran -c sgf_3d_w.f
f77 -c -o sgf_3d_2p_w.o sgf_3d_2p_w.f
make: f77: Command not found
make: *** [sgf_3d_2p_w.o] Error 127
I do not understand where in the make file (pasted below) there is a hidden f77 that did not get replaced. I checked all the sources files for "f77" and there was none. I am very confused.
#
# Objects
# -------
#
OBJ0 = verbal.o
OBJ1 = trgl6_octa.o trgl6_icos.o gauss_trgl.o gauss_leg.o
OBJ2 = sgf_3d_fs.o sgf_3d_w.o sgf_3d_2p_w.o
OBJ2A = sgf_3d_3p.o sgf_3d_3p_ewald.o sgf_3d_3p_qqq.o
OBJ3 = prtcl_3d_mob.o
OBJ30 = elm_geom.o abc.o interp_p.o printel.o
OBJ33 = slp_trgl6.o slp_trgl6_sing.o slp_trgl3_sing.o
OBJ4 = gel.o gel_inv.o
OBJ = $(OBJ0) $(OBJ1) $(OBJ2) $(OBJ2A) $(OBJ3) $(OBJ30) $(OBJ33) $(OBJ4)
#
# link
# ----
#
prtcl_3d_mob: $(OBJ)
gfortran -c prtcl_3d_mob $(OBJ)
#
# compile
# ------
#
prtcl_3d_mob.o: prtcl_3d_mob.f
gfortran -c prtcl_3d_mob.f
trgl6_octa.o: trgl6_octa.f
gfortran -c trgl6_octa.f
trgl6_icos.o: trgl6_icos.f
gfortran -c trgl6_icos.f
verbal.o: verbal.f
gfortran -c verbal.f
sgf_3d_fs.o: sgf_3d_fs.f
gfortran -c sgf_3d_fs.f
sgf_3d_w.o: sgf_3d_w.f
gfortran -c sgf_3d_w.f
sgf_3d_3p.o: sgf_3d_3p.f
gfortran -c sgf_3d_3p.f
sgf_3d_3p_ewald.o: sgf_3d_3p_ewald.f
gfortran -c sgf_3d_3p_ewald.f
sgf_3d_3p_qqq.o: sgf_3d_3p_qqq.f
gfortran -c sgf_3d_3p_qqq.f
gel.o: gel.f
gfortran -c gel.f
gel_inv.o: gel_inv.f
gfortran -c gel_inv.f
prtcl_3d_geo.o: prtcl_3d_geo.f
gfortran -c prtcl_3d_geo.f
interp_p.o: interp_p.f
gfortran -c interp_p.f
abc.o: abc.f
gfortran -c abc.f
printel.o: printel.f
gfortran -c printel.f
elm_geom.o: elm_geom.f
gfortran -c elm_geom.f
slp_trgl6.o: slp_trgl6.f
gfortran -c slp_trgl6.f
slp_trgl6_sing.o: slp_trgl6_sing.f
gfortran -c slp_trgl6_sing.f
slp_trgl3_sing.o: slp_trgl3_sing.f
gfortran -c slp_trgl3_sing.f
gauss_leg.o: gauss_leg.f
gfortran -c gauss_leg.f
gauss_trgl.o: gauss_trgl.f
gfortran -c gauss_trgl.f
#
# clean
# -----
#
clean:
rm -f core
rm -f $(OBJ) prtcl_3d_mob
rm -f prtcl_3d_mob.net prtcl_3d_mob.out
rm -f matrix_inverse.out
rm -f particle_elements.out
#
# purge
# ---
#
purge:
rm -f core
rm -f $(OBJ) prtcl_3d_mob
rm -f prtcl_3d_mob.net prtcl_3d_mob.out
rm -f matrix_inverse.out
rm -f particle_elements.out
#
# clobber
# ---
#
clobber:
rm *
#
# all
# ---
#
all:
make prtcl_3d_mob
GNU make has a number of implicit rules https://www.gnu.org/software/make/manual/make.html#Catalogue-of-Rules
By default, it will compile .f files with the rule $(FC) $(FFLAGS) -c where by default FC is set to f77 (see link above for all of this).
As an explicit rule ("from .f to .o") is not found for a file, make invokes the default rule.
Solutions: either one of the two
Set FC to gfortran
add an explicit rule for sgf_3d_2p_w.o
In general, I write the rule myself as
%.o: %.f90
$(FC) $(FFLAGS) -c $<
in the Makefile. It makes it obvious that I need to define FC and FFLAGS.
Also, you can then remove all of the individual rules for compiling your files.

Unable to install openssl in AIX due to "cc: unrecognized option"

So I installed openssl in one of the 3 aix servers but it just wouldn't work in the other 2 servers.
I'm trying to install openssl-1.0.1h on AIX.
Step 1: I ran the config file -
./config -–prefix=/appl/peoplesoft/apache/openssl
Output: a Makefile is generated.
Step 2: run the make command.
Output of command make:
$ make
making all in crypto...
( echo "#ifndef MK1MF_BUILD"; echo ' /* auto-generated by crypto/Makefile for crypto/cversion.c */'; echo ' #define CFLAGS "cc -DOPENSSL_THREADS -qthreaded -D_THREAD_SAFE -DDSO_DLFCN -DHAVE_DLFCN_H -q32 -O -DB_ENDIAN -qmaxmem=16384 -qro -qroconst -DOPENSSL_BN_ASM_MONT -DSHA1_ASM -DSHA256_ASM -DAES_ASM"'; echo ' #define PLATFORM "aix-cc"'; echo " #define DATE \"`LC_ALL=C LC_TIME=C date`\""; echo '#endif' ) >buildinf.h
cc -I. -I.. -I../include -DOPENSSL_THREADS -qthreaded -D_THREAD_SAFE -DDSO_DLFCN -DHAVE_DLFCN_H -q32 -O -DB_ENDIAN -qmaxmem=16384 -qro -qroconst -DOPENSSL_BN_ASM_MONT -DSHA1_ASM -DSHA256_ASM -DAES_ASM -c cryptlib.c
cc: unrecognized option '-qthreaded'
cc: unrecognized option '-q32'
cc: unrecognized option '-qmaxmem=16384'
cc: unrecognized option '-qro'
cc: unrecognized option '-qroconst'
I don't know what's wrong.
I'm using gcc version 4.2.0 and cc has a softlink to gcc.
Should I try copying the Makefile file from the server where it works?
I'll try the previous comments: gcc doesn't really understands xlc's options, use either this:
./Configure -–prefix=/appl/peoplesoft/apache/openssl -maix32 \
... aix-gcc
or
./Configure -–prefix=/appl/peoplesoft/apache/openssl -maix64 \
... aix64-gcc
Where ... is the set of compiler/linker options you can think of, eg:
-mtune=native -pthread -lpthreads -Wl,-brtl
Open config file , for AIX and locate the "favor vendor cc over gcc"
Change this: (replace cc with gcc for AIX)
if [ "${SYSTEM}" = "AIX" ]; then # favor vendor cc over gcc
(cc) 2>&1 | grep -iv "not found" > /dev/null && CC=cc
fi
to this :
if [ "${SYSTEM}" = "AIX" ]; then # favor vendor cc over gcc
(cc) 2>&1 | grep -iv "not found" > /dev/null && CC=gcc
fi
And rerun your configuration ...

avrdude: stk500v2_ReceiveMessage(): timeout Error for Arduino UNO

I am compiling and uploading sketch through command line. I have built a .CPP file as under:
#include< WProgram.h>
int led = 13;
void setup() {
pinMode(led, OUTPUT);
}
void loop() {
digitalWrite(led, HIGH);
delay(10000);
digitalWrite(led, LOW);
delay(1000);
}
Now i compiled using command: make TARGET=file_1402814559284 and it compiled fine. When i uploaded using command: make upload TARGET=file_1402814559284
avrdude -F -p atmega328p -P \\.\COM121 -c stk500 -b 115200 -C"avrdude.conf" -U
flash:w:file_1402814559284.hex
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer
avrdude: stk500v2_command(): failed miserably to execute command 0x10
avrdude: initialization failed, rc=-1
avrdude: AVR device initialized and ready to accept instructions
avrdude: Device signature = 0x000000
avrdude: Yikes! Invalid device signature.
avrdude: Expected signature for ATMEGA328P is 1E 95 0F
avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed
To disable this feature, specify the -D option.
Please suggest me how to resolve the problem. Code is easily uploaded using arduino IDE but through command line its a problem. I am using Arduino UNO atmega328p and no wiring is done. I am just checking the uploading part.
Make file i am using:
# Arduino makefile
# $Id$
SHELL=C:/Windows/System32/cmd.exe
PORT = \\.\COM121
#/dev/tty.USB*
ARDUINO = arduino
SRC = $(ARDUINO)/buffer.c $(ARDUINO)/pins_arduino.c \
$(ARDUINO)/Serial.c $(ARDUINO)/uart.c $(ARDUINO)/wiring.c
CXXSRC = $(TARGET).cpp $(ARDUINO)/HardwareSerial.cpp $(ARDUINO)/WRandom.cpp
MCU = atmega328p
F_CPU = 16000000
FORMAT = ihex
UPLOAD_RATE = 115200
# Name of this Makefile (used for "make depend").
MAKEFILE = Makefile
# Debugging format.
# Native formats for AVR-GCC's -g are stabs [default], or dwarf-2.
# AVR (extended) COFF requires stabs, plus an avr-objcopy run.
DEBUG = stabs
OPT = s
# Place -D or -U options here
CDEFS = -DF_CPU=$(F_CPU)
CXXDEFS = -DF_CPU=$(F_CPU)
# Place -I options here
CINCS = -I$(ARDUINO)
CXXINCS = -I$(ARDUINO)
# Compiler flag to set the C Standard level.
# c89 - "ANSI" C
# gnu89 - c89 plus GCC extensions
# c99 - ISO C99 standard (not yet fully implemented)
# gnu99 - c99 plus GCC extensions
CSTANDARD = -std=gnu99
CDEBUG = -g$(DEBUG)
CWARN = -Wall -Wstrict-prototypes
CTUNING = -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums
#CEXTRA = -Wa,-adhlns=$(<:.c=.lst)
CFLAGS = $(CDEBUG) $(CDEFS) $(CINCS) -O$(OPT) $(CWARN) $(CSTANDARD) $(CEXTRA)
CXXFLAGS = $(CDEFS) $(CINCS) -O$(OPT)
#ASFLAGS = -Wa,-adhlns=$(<:.S=.lst),-gstabs
LDFLAGS =
# Programming support using avrdude. Settings and variables.
AVRDUDE_PROGRAMMER = stk500
AVRDUDE_PORT = $(PORT)
AVRDUDE_WRITE_FLASH = -U flash:w:$(TARGET).hex
AVRDUDE_FLAGS =-F -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER) \
-b $(UPLOAD_RATE) -C"avrdude.conf"
# Program settings
# Program settings
CC = avr-gcc
CXX = avr-g++
OBJCOPY = avr-objcopy
OBJDUMP = avr-objdump
SIZE = avr-size
NM = avr-nm
AVRDUDE = avrdude
REMOVE = rm -f
MV = mv -f
# Define all object files.
OBJ = $(SRC:.c=.o) $(CXXSRC:.cpp=.o) $(ASRC:.S=.o)
# Define all listing files.
LST = $(ASRC:.S=.lst) $(CXXSRC:.cpp=.lst) $(SRC:.c=.lst)
# Combine all necessary flags and optional flags.
# Add target processor to flags.
ALL_CFLAGS = -mmcu=$(MCU) -I. $(CFLAGS)
ALL_CXXFLAGS = -mmcu=$(MCU) -I. $(CXXFLAGS)
ALL_ASFLAGS = -mmcu=$(MCU) -I. -x assembler-with-cpp $(ASFLAGS)
# Default target.
all: build
build: elf hex eep
elf: $(TARGET).elf
hex: $(TARGET).hex
eep: $(TARGET).eep
lss: $(TARGET).lss
sym: $(TARGET).sym
# Program the device.
upload: $(TARGET).hex $(TARGET).eep
$(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH)
# Convert ELF to COFF for use in debugging / simulating in AVR Studio or VMLAB.
COFFCONVERT=$(OBJCOPY) --debugging \
--change-section-address .data-0x800000 \
--change-section-address .bss-0x800000 \
--change-section-address .noinit-0x800000 \
--change-section-address .eeprom-0x810000
coff: $(TARGET).elf
$(COFFCONVERT) -O coff-avr $(TARGET).elf $(TARGET).cof
extcoff: $(TARGET).elf
$(COFFCONVERT) -O coff-ext-avr $(TARGET).elf $(TARGET).cof
.SUFFIXES: .elf .hex .eep .lss .sym
.elf.hex:
$(OBJCOPY) -O $(FORMAT) -R .eeprom $< $#
.elf.eep:
-$(OBJCOPY) -j .eeprom --set-section-flags=.eeprom="alloc,load" \
--change-section-lma .eeprom=0 -O $(FORMAT) $< $#
# Create extended listing file from ELF output file.
.elf.lss:
$(OBJDUMP) -h -S $< > $#
# Create a symbol table from ELF output file.
.elf.sym:
$(NM) -n $< > $#
# Link: create ELF output file from object files.
$(TARGET).elf: $(OBJ)
$(CC) $(ALL_CFLAGS) $(OBJ) --output $# $(LDFLAGS)
# Compile: create object files from C++ source files.
.cpp.o:
$(CXX) -c $(ALL_CXXFLAGS) $< -o $#
# Compile: create object files from C source files.
.c.o:
$(CC) -c $(ALL_CFLAGS) $< -o $#
# Compile: create assembler files from C source files.
.c.s:
$(CC) -S $(ALL_CFLAGS) $< -o $#
# Assemble: create object files from assembler source files.
.S.o:
$(CC) -c $(ALL_ASFLAGS) $< -o $#
# Target: clean project.
clean:
$(REMOVE) $(TARGET).hex $(TARGET).eep $(TARGET).cof $(TARGET).elf \
$(TARGET).map $(TARGET).sym $(TARGET).lss \
$(OBJ) $(LST) $(SRC:.c=.s) $(SRC:.c=.d) $(CXXSRC:.cpp=.s) $(CXXSRC:.cpp=.d)
depend:
if grep '^# DO NOT DELETE' $(MAKEFILE) >/dev/null; \
then \
sed -e '/^# DO NOT DELETE/,$$d' $(MAKEFILE) > \
$(MAKEFILE).$$$$ && \
$(MV) $(MAKEFILE).$$$$ $(MAKEFILE); \
fi
echo '# DO NOT DELETE THIS LINE -- make depend depends on it.' \
>> $(MAKEFILE); \
$(CC) -M -mmcu=$(MCU) $(CDEFS) $(CINCS) $(SRC) $(ASRC) >> $(MAKEFILE)
.PHONY: all build elf hex eep lss sym program coff extcoff clean depend

Problems in Mac Lion Software compiler problems .. correct setup process required

The system has been useing Macports. I configured the system exactly as per the line by line instructions of these guidelines. In the process I got the error below. The only change I have from it is that instead of using easy_install I did easy_install-2.6. I feel it is a CXX error something which is kind of above my knowledge. Can some one help me in setting up my Mac correctly? I am a heavy user of Xcode (iPhone development) and a Roboticist and need a compiler for executing C files. I would also be willing on working with Python for this and future setups (wsgi applications). I have a 64-bit OSX Lion running currently.
{-------------------------------------------------------------------------------
-- The CXX compiler identification is GNU
-- Checking whether C compiler has -isysroot
-- Checking whether C compiler has -isysroot - yes
-- Checking whether C compiler supports OSX deployment target flag
-- Checking whether C compiler supports OSX deployment target flag - yes
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Checking whether CXX compiler has -isysroot
-- Checking whether CXX compiler has -isysroot - yes
-- Checking whether CXX compiler supports OSX deployment target flag
-- Checking whether CXX compiler supports OSX deployment target flag - yes
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
[rosbuild] Building package rosconsole
[rosbuild] Cached build flags older than manifests; calling rospack to get flags
[rosbuild] Including /Users/rajeshmedampudi/ros/ros_comm/clients/roslisp/cmake/roslisp.cmake
[rosbuild] Including /Users/rajeshmedampudi/ros/ros_comm/clients/rospy/cmake/rospy.cmake
[rosbuild] Including /Users/rajeshmedampudi/ros/ros_comm/clients/cpp/roscpp/cmake/roscpp.cmake
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/rajeshmedampudi/ros/ros_comm/tools/rosconsole/build
cd build && make -l8
Scanning dependencies of target rospack_genmsg_libexe
[ 0%] Built target rospack_genmsg_libexe
Scanning dependencies of target rosbuild_precompile
[ 0%] Built target rosbuild_precompile
Scanning dependencies of target rosconsole
[ 50%] Building CXX object CMakeFiles/rosconsole.dir/src/rosconsole/rosconsole.o
/Users/rajeshmedampudi/ros/ros_comm/tools/rosconsole/src/rosconsole/rosconsole.cpp:684: internal compiler error: Segmentation fault: 11
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://developer.apple.com/bugreporter> for instructions.
make[3]: *** [CMakeFiles/rosconsole.dir/src/rosconsole/rosconsole.o] Error 1
make[2]: *** [CMakeFiles/rosconsole.dir/all] Error 2
make[1]: *** [all] Error 2
-------------------------------------------------------------------------------}
[ rosmake ] Output from build of package rosconsole written to:
[ rosmake ] /Users/rajeshmedampudi/.ros/rosmake/rosmake_output-20111107-233014/rosconsole/build_output.log
[rosmake-4] Finished <<< rosconsole [FAIL] [ 7.71 seconds ]
[ rosmake ] Halting due to failure in package rosconsole.
[ rosmake ] Waiting for other threads to complete.
[rosmake-0] Finished <<< rosunit [PASS] [ 24.44 seconds ]
[rosmake-5] Finished <<< rosgraph [PASS] [ 24.44 seconds ]
[rosmake-6] Finished <<< std_msgs [PASS] [ 24.44 seconds ]
[ rosmake ] Results:
[ rosmake ] Built 28 packages with 1 failures.
[ rosmake ] Summary output to directory
[ rosmake ] /Users/rajeshmedampudi/.ros/rosmake/rosmake_output-20111107-233014
Traceback (most recent call last):
File "/usr/local/bin/rosinstall", line 5, in <module>
pkg_resources.run_script('rosinstall==0.5.22', 'rosinstall')
File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/pkg_resources.py", line 489, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/pkg_resources.py", line 1214, in run_script
exec script_code in namespace, namespace
File "/Library/Python/2.6/site-packages/rosinstall-0.5.22-py2.6.egg/EGG-INFO/scripts/rosinstall", line 679, in <module>
File "/Library/Python/2.6/site-packages/rosinstall-0.5.22-py2.6.egg/EGG-INFO/scripts/rosinstall", line 670, in rosinstall_main
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/subprocess.py", line 488, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'source /Users/rajeshmedampudi/ros/setup.sh && rosmake ros ros_comm --rosdep-install' returned non-zero exit status 1
This is the Config problem i am having while i am trying to compile with my current llvm-gcc
This is the config.log(in full) as you already must be knowing i am a little inexperienced with the compiler changes and all...
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by llvm configure 3.1svn, which was
generated by GNU Autoconf 2.60. Invocation command line was
$ ./configure --prefix=/opt --enable-optimized
## --------- ##
## Platform. ##
## --------- ##
hostname = Rajeshs-Mac-Pro.local
uname -m = x86_64
uname -r = 11.2.0
uname -s = Darwin
uname -v = Darwin Kernel Version 11.2.0: Tue Aug 9 20:54:00 PDT 2011; root:xnu-1699.24.8~1/RELEASE_X86_64
/usr/bin/uname -p = i386
/bin/uname -X = unknown
/bin/arch = unknown
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo = Mach kernel version:
Darwin Kernel Version 11.2.0: Tue Aug 9 20:54:00 PDT 2011; root:xnu-1699.24.8~1/RELEASE_X86_64
Kernel configured for up to 8 processors.
4 processors are physically available.
8 processors are logically available.
Processor type: i486 (Intel 80486)
Processors active: 0 1 2 3 4 5 6 7
Primary memory available: 8.00 gigabytes
Default processor set: 141 tasks, 759 threads, 8 processors
Load average: 0.99, Mach factor: 7.00
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown
PATH: /Library/Frameworks/Python.framework/Versions/2.7/bin
PATH: /opt/local/bin
PATH: /opt/local/sbin
PATH: /opt/local/bin
PATH: /opt/local/sbin
PATH: /Library/Frameworks/Python.framework/Versions/2.6/bin
PATH: /opt/local/bin
PATH: /opt/local/sbin
PATH: /opt/local/bin
PATH: /opt/local/sbin
PATH: /usr/local/mysql/bin
PATH: /usr/bin
PATH: /bin
PATH: /usr/sbin
PATH: /sbin
PATH: /usr/local/bin
PATH: /usr/X11/bin
## ----------- ##
## Core tests. ##
## ----------- ##
configure:2067: checking for C compiler version
configure:2074: clang --version >&5
Apple clang version 3.0 (tags/Apple/clang-211.10.1) (based on LLVM 3.0svn)
Target: x86_64-apple-darwin11.2.0
Thread model: posix
configure:2077: $? = 0
configure:2084: clang -v >&5
Apple clang version 3.0 (tags/Apple/clang-211.10.1) (based on LLVM 3.0svn)
Target: x86_64-apple-darwin11.2.0
Thread model: posix
configure:2087: $? = 0
configure:2094: clang -V >&5
clang: error: argument to '-V' is missing (expected 1 value)
clang: error: no input files
configure:2097: $? = 1
configure:2120: checking for C compiler default output file name
configure:2147: clang -Qunused-arguments -Qunused-arguments conftest.c >&5
configure:2150: $? = 0
configure:2196: result: a.out
configure:2201: checking whether the C compiler works
configure:2211: ./a.out
configure:2214: $? = 0
configure:2231: result: yes
configure:2238: checking whether we are cross compiling
configure:2240: result: no
configure:2243: checking for suffix of executables
configure:2250: clang -o conftest -Qunused-arguments -Qunused-arguments conftest.c >&5
configure:2253: $? = 0
configure:2277: result:
configure:2283: checking for suffix of object files
configure:2309: clang -c -Qunused-arguments -Qunused-arguments conftest.c >&5
configure:2312: $? = 0
configure:2335: result: o
configure:2339: checking whether we are using the GNU C compiler
configure:2368: clang -c -Qunused-arguments -Qunused-arguments conftest.c >&5
configure:2374: $? = 0
configure:2381: test -z "$ac_c_werror_flag" || test ! -s conftest.err
configure:2384: $? = 0
configure:2391: test -s conftest.o
configure:2394: $? = 0
configure:2408: result: yes
configure:2413: checking whether clang accepts -g
configure:2443: clang -c -g -Qunused-arguments conftest.c >&5
configure:2449: $? = 0
configure:2456: test -z "$ac_c_werror_flag" || test ! -s conftest.err
configure:2459: $? = 0
configure:2466: test -s conftest.o
configure:2469: $? = 0
configure:2599: result: yes
configure:2616: checking for clang option to accept ISO C89
configure:2690: clang -c -Qunused-arguments -Qunused-arguments conftest.c >&5
configure:2696: $? = 0
configure:2703: test -z "$ac_c_werror_flag" || test ! -s conftest.err
configure:2706: $? = 0
configure:2713: test -s conftest.o
configure:2716: $? = 0
configure:2736: result: none needed
configure:2870: checking for C++ compiler version
configure:2877: llvm-g++ --version >&5
i686-apple-darwin11-llvm-g++-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
configure:2880: $? = 0
configure:2887: llvm-g++ -v >&5
Using built-in specs.
Target: i686-apple-darwin11
Configured with: /private/var/tmp/llvmgcc42/llvmgcc42-2336.1~1/src/configure --disable-checking --enable-werror --prefix=/Developer/usr/llvm-gcc-4.2 --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-prefix=llvm- --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-darwin11 --enable-llvm=/private/var/tmp/llvmgcc42/llvmgcc42-2336.1~1/dst-llvmCore/Developer/usr/local --program-prefix=i686-apple-darwin11- --host=x86_64-apple-darwin11 --target=i686-apple-darwin11 --with-gxx-include-dir=/usr/include/c++/4.2.1
Thread model: posix
gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00)
configure:2890: $? = 0
configure:2897: llvm-g++ -V >&5
llvm-g++-4.2: argument to `-V' is missing
configure:2900: $? = 1
configure:2903: checking whether we are using the GNU C++ compiler
configure:2932: llvm-g++ -c -Qunused-arguments conftest.cpp >&5
configure:2938: $? = 0
configure:2945: test -z "$ac_cxx_werror_flag" || test ! -s conftest.err
configure:2948: $? = 0
configure:2955: test -s conftest.o
configure:2958: $? = 0
configure:2972: result: yes
configure:2977: checking whether llvm-g++ accepts -g
configure:3007: llvm-g++ -c -g -Qunused-arguments conftest.cpp >&5
configure:3013: $? = 0
configure:3020: test -z "$ac_cxx_werror_flag" || test ! -s conftest.err
configure:3023: $? = 0
configure:3030: test -s conftest.o
configure:3033: $? = 0
configure:3163: result: yes
configure:3191: checking how to run the C preprocessor
configure:3321: result: llvm-gcc-4.2
configure:3350: llvm-gcc-4.2 -Qunused-arguments conftest.c
conftest.c:13: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'error'
configure:3356: $? = 1
configure: failed program was:
| /* confdefs.h. */
| #define PACKAGE_NAME "llvm"
| #define PACKAGE_TARNAME "-llvm-"
| #define PACKAGE_VERSION "3.1svn"
| #define PACKAGE_STRING "llvm 3.1svn"
| #define PACKAGE_BUGREPORT "llvmbugs#cs.uiuc.edu"
| /* end confdefs.h. */
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
| Syntax error
configure:3350: llvm-gcc-4.2 -Qunused-arguments conftest.c
conftest.c:13: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'error'
configure:3356: $? = 1
configure: failed program was:
| /* confdefs.h. */
| #define PACKAGE_NAME "llvm"
| #define PACKAGE_TARNAME "-llvm-"
| #define PACKAGE_VERSION "3.1svn"
| #define PACKAGE_STRING "llvm 3.1svn"
| #define PACKAGE_BUGREPORT "llvmbugs#cs.uiuc.edu"
| /* end confdefs.h. */
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
| Syntax error
configure:3432: error: C preprocessor "llvm-gcc-4.2" fails sanity check
See `config.log' for more details.
## ---------------- ##
## Cache variables. ##
## ---------------- ##
ac_cv_c_compiler_gnu=yes
ac_cv_cxx_compiler_gnu=yes
ac_cv_env_CCC_set=
ac_cv_env_CCC_value=
ac_cv_env_CC_set=set
ac_cv_env_CC_value=clang
ac_cv_env_CFLAGS_set=set
ac_cv_env_CFLAGS_value=-Qunused-arguments
ac_cv_env_CPPFLAGS_set=set
ac_cv_env_CPPFLAGS_value=-Qunused-arguments
ac_cv_env_CPP_set=set
ac_cv_env_CPP_value=llvm-gcc-4.2
ac_cv_env_CXXFLAGS_set=
ac_cv_env_CXXFLAGS_value=
ac_cv_env_CXX_set=set
ac_cv_env_CXX_value=llvm-g++
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_objext=o
ac_cv_prog_CPP=llvm-gcc-4.2
ac_cv_prog_cc_c89=
ac_cv_prog_cc_g=yes
ac_cv_prog_cxx_g=yes
## ----------------- ##
## Output variables. ##
## ----------------- ##
ALL_BINDINGS=''
AR=''
ARCH=''
BINDINGS_TO_BUILD=''
BINPWD=''
BINUTILS_INCDIR=''
BUILD_CC=''
BUILD_CXX=''
BUILD_EXEEXT=''
BZIP2=''
CAT=''
CC='clang'
CFLAGS='-Qunused-arguments'
CIRCO=''
CLANG_SRC_ROOT=''
CMP=''
CONVENIENCE_LTDL_FALSE=''
CONVENIENCE_LTDL_TRUE=''
CP=''
CPP='llvm-gcc-4.2'
CPPFLAGS='-Qunused-arguments'
CVSBUILD=''
CXX='llvm-g++'
CXXFLAGS='-g -O2'
DATE=''
DEBUG_RUNTIME=''
DEBUG_SYMBOLS=''
DEFS=''
DISABLE_ASSERTIONS=''
DOT=''
DOTTY=''
DOXYGEN=''
ECHO_C='ECHO_N=''
ECHO_T=''
EGREP=''
ENABLE_CBE_PRINTF_A=''
ENABLE_DOCS=''
ENABLE_DOXYGEN=''
ENABLE_EMBED_STDCXX=''
ENABLE_EXPENSIVE_CHECKS=''
ENABLE_OPTIMIZED=''
ENABLE_PIC=''
ENABLE_POLLY=''
ENABLE_PROFILING=''
ENABLE_PTHREADS=''
ENABLE_SHARED=''
ENABLE_THREADS=''
ENABLE_TIMESTAMPS=''
ENABLE_VISIBILITY_INLINES_HIDDEN=''
ENDIAN=''
EXEEXT=''
EXPENSIVE_CHECKS=''
EXTRA_LD_OPTIONS=''
EXTRA_OPTIONS=''
FDP=''
FIND=''
GAS=''
GRAPHVIZ=''
GREP=''
GROFF=''
GV=''
GZIPBIN=''
HAVE_LINK_VERSION_SCRIPT=''
HAVE_PERL=''
HAVE_PTHREAD=''
HOST_OS=''
HUGE_VAL_SANITY=''
INSTALL_DATA=''
INSTALL_LTDL_FALSE=''
INSTALL_LTDL_TRUE=''
INSTALL_PROGRAM=''
INSTALL_SCRIPT=''
JIT=''
LDFLAGS=''
LIBADD_DL=''
LIBOBJS=''
LIBS=''
LINKALL=''
LLVM_BINDIR=''
LLVM_CONFIGTIME=''
LLVM_COPYRIGHT='Copyright (c) 2003-2011 University of Illinois at Urbana-Champaign.'
LLVM_CROSS_COMPILING=''
LLVM_DATADIR=''
LLVM_DOCSDIR=''
LLVM_ENUM_ASM_PARSERS=''
LLVM_ENUM_ASM_PRINTERS=''
LLVM_ENUM_DISASSEMBLERS=''
LLVM_ENUM_TARGETS=''
LLVM_ETCDIR=''
LLVM_HAS_POLLY=''
LLVM_INCLUDEDIR=''
LLVM_INFODIR=''
LLVM_LIBDIR=''
LLVM_MANDIR=''
LLVM_ON_UNIX=''
LLVM_ON_WIN32=''
LLVM_PREFIX=''
LN_S=''
LTLIBOBJS=''
MKDIR=''
MMAP_FILE=''
MV=''
NEATO=''
NM=''
NOLINKALL=''
NO_MISSING_FIELD_INITIALIZERS=''
NO_VARIADIC_MACROS=''
OBJEXT='o'
OCAMLC=''
OCAMLDEP=''
OCAMLDOC=''
OCAMLOPT=''
OCAML_LIBDIR=''
OPTIMIZE_OPTION=''
OS=''
PACKAGE_BUGREPORT='llvmbugs#cs.uiuc.edu'
PACKAGE_NAME='llvm'
PACKAGE_STRING='llvm 3.1svn'
PACKAGE_TARNAME='-llvm-'
PACKAGE_VERSION='3.1svn'
PATH_SEPARATOR=':'
PDFROFF=''
PERL=''
POD2HTML=''
POD2MAN=''
RANLIB=''
RDYNAMIC=''
RM=''
RPATH=''
RUNTEST=''
SED=''
SHELL='/bin/sh'
SHLIBEXT=''
SHLIBPATH_VAR=''
TAR=''
TARGETS_TO_BUILD=''
TARGET_HAS_JIT=''
TARGET_OS=''
TCLSH=''
TWOPI=''
USE_OPROFILE=''
USE_UDIS86=''
XDOT_PY=''
ZIP=''
ac_ct_CC=''
ac_ct_CXX=''
bindir='${exec_prefix}/bin'
build=''
build_alias=''
build_cpu=''
build_os=''
build_vendor=''
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
dvidir='${docdir}'
exec_prefix='NONE'
host=''
host_alias=''
host_cpu=''
host_os=''
host_vendor=''
htmldir='${docdir}'
ifGNUmake=''
includedir='${prefix}/include'
infodir='${datarootdir}/info'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='/opt'
program_transform_name='s,x,x,'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
subdirs=''
sysconfdir='${prefix}/etc'
target=''
target_alias=''
target_cpu=''
target_os=''
target_vendor=''
## ----------- ##
## confdefs.h. ##
## ----------- ##
#define PACKAGE_NAME "llvm"
#define PACKAGE_TARNAME "-llvm-"
#define PACKAGE_VERSION "3.1svn"
#define PACKAGE_STRING "llvm 3.1svn"
#define PACKAGE_BUGREPORT "llvmbugs#cs.uiuc.edu"
configure: exit 1
Now i did not find any material of how to go about in installing llvm-chang in my system where do you need to install it and how to go about it. do you know of any such... It would be a great help in clearing this out... thanks.
PS: this is the guide i am using. i tried making downloading the files to /usr/llvm and they did download but got stuck at the .configure part.... do you want me to specify any other form of messages that need to be done in setting up the mac compiler correctly.
The guidelines you are referring to are outdated, please check the users guide on their website
Have you tried to install the package apple-gcc42 and force the compiler to GCC instead of LLVM? Xcode 4.2 uses LLVM by default and it does not come with GCC anymore.
Well, I just ran into the same problem on Mac OS X Lion (10.7).
So far, this workaround worked for me:
change to the directory ..../ros/ros_comm/tools/rosconsole/build
and call 'make'. This should produce the same error again.
Now call 'make -n' which prints out the commands which are really called by make.
Pick the (long) line where it compiles (c++) rosconsole.cpp from them, change the optimization option from -O2 to -O0 (thats MINUS OHH ZERO) and execute that command.
Then call make again to let it finish its work.
The problem seems that the Python that comes installed with the Lion software seems to have been messe with. What i Basically did was to create a new login and then carry on the installation process with easy-install2.6 . rather than use easy install easy_install

Resources