The curent llvm svn (r54623) is unable to link the gfortran compiler in llvm-gcc-4.2 svn. I am getting the error... c++ -g -O2 -mdynamic-no-pic -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wmissing-format-attribute -mdynamic-no-pic -DHAVE_CONFIG_H -o f951 \ fortran/arith.o fortran/array.o fortran/bbt.o fortran/check.o fortran/data.o fortran/decl.o fortran/dump-parse-tree.o fortran/error.o fortran/expr.o fortran/interface.o fortran/intrinsic.o fortran/io.o fortran/iresolve.o fortran/match.o fortran/matchexp.o fortran/misc.o fortran/module.o fortran/openmp.o fortran/options.o fortran/parse.o fortran/primary.o fortran/resolve.o fortran/scanner.o fortran/simplify.o fortran/st.o fortran/symbol.o fortran/convert.o fortran/dependency.o fortran/f95-lang.o fortran/trans.o fortran/trans-array.o fortran/trans-common.o fortran/trans-const.o fortran/trans-decl.o fortran/trans-expr.o fortran/trans-intrinsic.o fortran/trans-io.o fortran/trans-openmp.o fortran/trans-stmt.o fortran/trans-types.o llvm-main.o libbackend.a ../libcpp/libcpp.a /sw/src/fink.build/llvm-gcc42-2.3.999-20080810/llvm_objdir/Release/lib/libLLVMBitReader.a /sw/src/fink.build/llvm-gcc42-2.3.999-20080810/llvm_objdir/Release/lib/libLLVMipo.a /sw/src/fink.build/llvm-gcc42-2.3.999-20080810/llvm_objdir/Release/lib/libLLVMBitWriter.a /sw/src/fink.build/llvm-gcc42-2.3.999-20080810/llvm_objdir/Release/lib/LLVMX86.o /sw/src/fink.build/llvm-gcc42-2.3.999-20080810/llvm_objdir/Release/lib/libLLVMSelectionDAG.a /sw/src/fink.build/llvm-gcc42-2.3.999-20080810/llvm_objdir/Release/lib/libLLVMCodeGen.a /sw/src/fink.build/llvm-gcc42-2.3.999-20080810/llvm_objdir/Release/lib/libLLVMScalarOpts.a /sw/src/fink.build/llvm-gcc42-2.3.999-20080810/llvm_objdir/Release/lib/libLLVMTransformUtils.a /sw/src/fink.build/llvm-gcc42-2.3.999-20080810/llvm_objdir/Release/lib/libLLVMipa.a /sw/src/fink.build/llvm-gcc42-2.3.999-20080810/llvm_objdir/Release/lib/libLLVMAnalysis.a /sw/src/fink.build/llvm-gcc42-2.3.999-20080810/llvm_objdir/Release/lib/libLLVMTarget.a /sw/src/fink.build/llvm-gcc42-2.3.999-20080810/llvm_objdir/Release/lib/libLLVMCore.a /sw/src/fink.build/llvm-gcc42-2.3.999-20080810/llvm_objdir/Release/lib/libLLVMSupport.a /sw/src/fink.build/llvm-gcc42-2.3.999-20080810/llvm_objdir/Release/lib/libLLVMSystem.a attribs.o stub-objc.o stub-c.o -L/sw/lib -lmpfr -lgmp ../libcpp/libcpp.a ./../intl/libintl.a /usr/lib/libiconv.dylib ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a -L/sw/src/fink.build/llvm-gcc42-2.3.999-20080810/llvm_objdir/Release/lib -lpthread -lm Undefined symbols: "_create_init_utf16_var", referenced from: _darwin_build_constant_cfstring in libbackend.a(darwin.o) ld: symbol(s) not found collect2: ld returned 1 exit status make[3]: *** [f951] Error 1 make[2]: *** [all-stage2-gcc] Error 2 make[1]: *** [stage2-bubble] Error 2 make: *** [all] Error 2 Why is c++ being used instead of /sw/src/fink.build/llvm-gcc42-2.3.999-20080810/llvm_gcc42_objdir/./prev-gcc/xgcc? Jack
Hi Jack,> The curent llvm svn (r54623) is unable to link the gfortran > compiler in llvm-gcc-4.2 svn. I am getting the error......> Undefined symbols: > "_create_init_utf16_var", referenced from: > _darwin_build_constant_cfstring in libbackend.a(darwin.o)this is probably due to recent Apple changes. Fortran builds on linux.> Why is c++ being used instead of /sw/src/fink.build/llvm-gcc42-2.3.999-20080810/llvm_gcc42_objdir/./prev-gcc/xgcc?I think this is because some people may not have C++ in the list of languages to build. There's even a PR about this: http://llvm.org/bugs/show_bug.cgi?id=1150 Ciao, Duncan.
Duncan, I don't be that can be the cause because I have... --enable-languages=c,c++,fortran in my configure options for llvm-gcc-4.2. Jack On Mon, Aug 11, 2008 at 08:40:52AM +0200, Duncan Sands wrote:> Hi Jack, > > > The curent llvm svn (r54623) is unable to link the gfortran > > compiler in llvm-gcc-4.2 svn. I am getting the error... > ... > > Undefined symbols: > > "_create_init_utf16_var", referenced from: > > _darwin_build_constant_cfstring in libbackend.a(darwin.o) > > this is probably due to recent Apple changes. Fortran builds on > linux. > > > Why is c++ being used instead of /sw/src/fink.build/llvm-gcc42-2.3.999-20080810/llvm_gcc42_objdir/./prev-gcc/xgcc? > > I think this is because some people may not have C++ in the list > of languages to build. There's even a PR about this: > http://llvm.org/bugs/show_bug.cgi?id=1150 > > Ciao, > > Duncan.
On Aug 10, 2008, at 11:40 PM, Duncan Sands wrote:> Hi Jack, > >> The curent llvm svn (r54623) is unable to link the gfortran >> compiler in llvm-gcc-4.2 svn. I am getting the error... > ... >> Undefined symbols: >> "_create_init_utf16_var", referenced from: >> _darwin_build_constant_cfstring in libbackend.a(darwin.o) > > this is probably due to recent Apple changes. Fortran builds on > linux. >This function is defined in config/darwin-c.c. Are you building & linking that in? -bw
On Aug 10, 2008, at 11:40 PM, Duncan Sands wrote:> Hi Jack, > >> The curent llvm svn (r54623) is unable to link the gfortran >> compiler in llvm-gcc-4.2 svn. I am getting the error... > ... >> Undefined symbols: >> "_create_init_utf16_var", referenced from: >> _darwin_build_constant_cfstring in libbackend.a(darwin.o) > > this is probably due to recent Apple changes. Fortran builds on > linux. > >>I just looked at what's going on here, and I threw up a little in my mouth. It's just horrendous. For some reason, they placed a whole bunch of ObjC-building code into darwin.c, then had it call this function in darwin-c.c. If I try to put that function into darwin.c, all hell breaks loose. So even though the Fortran stuff wouldn't call the Obj-C stuff in darwin.c, it appears like it still needs the darwin-c.c file linked in with it. -bw
Jack, Could you try this patch to see if it works for you? -bw Index: gcc/stub-c.c ==================================================================--- gcc/stub-c.c (revision 54771) +++ gcc/stub-c.c (working copy) @@ -157,3 +157,25 @@ { gcc_assert(0); } + +bool cvt_utf8_utf16 (const unsigned char *, size_t, unsigned char **, + size_t *) ATTRIBUTE_WEAK; + +bool +cvt_utf8_utf16 (const unsigned char * inbuf ATTRIBUTE_UNUSED, + size_t length ATTRIBUTE_UNUSED, + unsigned char ** uniCharBuf ATTRIBUTE_UNUSED, + size_t * numUniChars ATTRIBUTE_UNUSED) +{ + gcc_assert(0); +} + +tree create_init_utf16_var (const unsigned char *, size_t, size_t *) ATTRIBUTE_WEAK; + +tree +create_init_utf16_var (const unsigned char * inbuf ATTRIBUTE_UNUSED, + size_t length ATTRIBUTE_UNUSED, + size_t * numUniChars ATTRIBUTE_UNUSED) +{ + gcc_assert(0); +} On Aug 10, 2008, at 6:00 PM, Jack Howarth wrote:> The curent llvm svn (r54623) is unable to link the gfortran > compiler in llvm-gcc-4.2 svn. I am getting the error... > > c++ -g -O2 -mdynamic-no-pic -DIN_GCC -W -Wall -Wwrite-strings - > Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long - > Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition - > Wmissing-format-attribute -mdynamic-no-pic -DHAVE_CONFIG_H -o > f951 \ > fortran/arith.o fortran/array.o fortran/bbt.o fortran/check.o > fortran/data.o fortran/decl.o fortran/dump-parse-tree.o fortran/ > error.o fortran/expr.o fortran/interface.o fortran/intrinsic.o > fortran/io.o fortran/iresolve.o fortran/match.o fortran/matchexp.o > fortran/misc.o fortran/module.o fortran/openmp.o fortran/options.o > fortran/parse.o fortran/primary.o fortran/resolve.o fortran/ > scanner.o fortran/simplify.o fortran/st.o fortran/symbol.o fortran/ > convert.o fortran/dependency.o fortran/f95-lang.o fortran/trans.o > fortran/trans-array.o fortran/trans-common.o fortran/trans-const.o > fortran/trans-decl.o fortran/trans-expr.o fortran/trans-intrinsic.o > fortran/trans-io.o fortran/trans-openmp.o fortran/trans-stmt.o > fortran/trans-types.o llvm-main.o libbackend.a ../libcpp/libcpp.a / > sw/src/fink.build/llvm-gcc42-2.3.999-20080810/llvm_objdir/Release/ > lib/libLLVMBitReader.a /sw/src/fink.build/llvm- > gcc42-2.3.999-20080810/llvm_objdir/Release/lib/libLLVMipo.a /sw/src/ > fink.build/llvm-gcc42-2.! > 3.999-20080810/llvm_objdir/Release/lib/libLLVMBitWriter.a /sw/src/ > fink.build/llvm-gcc42-2.3.999-20080810/llvm_objdir/Release/lib/ > LLVMX86.o /sw/src/fink.build/llvm-gcc42-2.3.999-20080810/llvm_objdir/ > Release/lib/libLLVMSelectionDAG.a /sw/src/fink.build/llvm- > gcc42-2.3.999-20080810/llvm_objdir/Release/lib/libLLVMCodeGen.a /sw/ > src/fink.build/llvm-gcc42-2.3.999-20080810/llvm_objdir/Release/lib/ > libLLVMScalarOpts.a /sw/src/fink.build/llvm-gcc42-2.3.999-20080810/ > llvm_objdir/Release/lib/libLLVMTransformUtils.a /sw/src/fink.build/ > llvm-gcc42-2.3.999-20080810/llvm_objdir/Release/lib/libLLVMipa.a /sw/ > src/fink.build/llvm-gcc42-2.3.999-20080810/llvm_objdir/Release/lib/ > libLLVMAnalysis.a /sw/src/fink.build/llvm-gcc42-2.3.999-20080810/ > llvm_objdir/Release/lib/libLLVMTarget.a /sw/src/fink.build/llvm- > gcc42-2.3.999-20080810/llvm_objdir/Release/lib/libLLVMCore.a /sw/src/ > fink.build/llvm-gcc42-2.3.999-20080810/llvm_objdir/Release/lib/ > libLLVMSupport.a /sw/src/fink.build/llvm-gcc42-2.3.999-20080810/ll! > vm_objdir/Release/lib/libLLVMSystem.a attribs.o stub-objc.o stub-c.o - > L/sw/lib -lmpfr -lgmp ../libcpp/libcpp.a ./../intl/libintl.a /usr/ > lib/libiconv.dylib ../libiberty/libiberty.a ../libdecnumber/ > libdecnumber.a -L/sw/src/fink.build/llvm-gcc42-2.3.999-20080810/ > llvm_objdir/Release/lib -lpthread -lm > Undefined symbols: > "_create_init_utf16_var", referenced from: > _darwin_build_constant_cfstring in libbackend.a(darwin.o) > ld: symbol(s) not found > collect2: ld returned 1 exit status > make[3]: *** [f951] Error 1 > make[2]: *** [all-stage2-gcc] Error 2 > make[1]: *** [stage2-bubble] Error 2 > make: *** [all] Error 2 > > Why is c++ being used instead of /sw/src/fink.build/llvm- > gcc42-2.3.999-20080810/llvm_gcc42_objdir/./prev-gcc/xgcc? > Jack > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Apparently Analagous Threads
- [LLVMdev] gfortran link failure in current llvm svn
- [LLVMdev] gfortran link failure in current llvm svn
- [LLVMdev] gfortran link failure in current llvm svn
- [LLVMdev] gfortran link failure in current llvm svn
- [LLVMdev] gfortran link failure in current llvm svn