From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11318c,15dac816a7ed924e X-Google-Attributes: gid11318c,public X-Google-Thread: fee84,15dac816a7ed924e X-Google-Attributes: gidfee84,public X-Google-Thread: 1020c6,15dac816a7ed924e X-Google-Attributes: gid1020c6,public From: carter@shelby.mst6.lanl.gov (Dave Carter) Subject: Re: GNU flex compile problem Date: 1996/02/15 Message-ID: <4fu3ke$506@ferrari.mst6.lanl.gov>#1/1 X-Deja-AN: 139599975 references: <4fqd6g$gto@ferrari.mst6.lanl.gov> followup-to: comp.unix.admin,comp.unix.osf.osf1,gnu.gcc.help organization: Los Alamos National Lab, Group MST-6 newsgroups: comp.unix.admin,comp.unix.osf.osf1,gnu.gcc.help I previously wrote: > i get the following error when compiling GNU flex-2.5.2: > gcc -g -O -o flex ccl.o dfa.o ecs.o gen.o main.o misc.o nfa.o > parse.o scan.o skel.o sym.o tblcmp.o yylex.o libfl.a > collect2: ld returned 1 exit status > /usr/ucb/ld: > Warning: Linking some objects which contain exception information > sections and some which do not. This may cause fatal runtime > exception handling problems (last obj encountered without > exceptions was skel.o). > Unresolved: > __malloc > __realloc > __free > make: *** [flex] Error 1 Thanks to Kevin Oberman who helped me try to diagnose this problem. He wrote: > As previously mentioned, the warning is not important. Did you run > configure? It looks like you compiled with the wrong options. There > should be several defines on the compile line: > -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_ALLOCA_H=1 i ran configure, with no options. if it compiled with the wrong options, then configure didn't work properly for my system. (vanilla DEC OSF/1 3.2A running on an Alpha.) i tried again to compile it making sure those defines were in there, but got the same error. Kevin Oberman responded with: > Yup. Something weird is going on here. What version of gcc are you > running? I can confirm that the symbol "__malloc" is not found in > either libc or libgcc with gcc 2.7.2. You might want to scan the > objects with nm and see if you can find the one that is trying to > link to __malloc. (nm *.o | grep malloc) This is just a shot in the > dark, though. > Did you build gcc with gcc? This is grasping at straws, but it is a > common problem. People get gcc, configure, and make install. This > build gcc with cc and the resulting gcc is not a good compiler. i am running gcc 2.7.2. i built gcc with gcc, twice, i believe, as it recommended in INSTALL. the only problems i saw were the warnings about objects containing exception information, which i guess i can ignore. scanning the object files didn't produce much useful, but it appears that at least scan.c and initscan.c accesses malloc. does anyone have any idea where to look next? - dave