LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE
User Name
Password
SUSE / openSUSE This Forum is for the discussion of Suse Linux.

Notices


Reply
  Search this Thread
Old 12-06-2017, 07:47 AM   #1
getsoubl
LQ Newbie
 
Registered: Dec 2017
Posts: 3

Rep: Reputation: Disabled
Undefined reference to mpfr_snprintf when try to compile gcc.5.5.0 in opensuse


I am trying to compile and isntall the gcc 5.5.0 compiler in the opensuse 11.4 SLES . During compilation I got an error that mpfr_snprintf is undefined, in file that is located in x86_64-unknown-linux-gnu-gcc directory. Specifically the file is the usban.c. I have installed the approrpiate libary. Has anyone any point how to fix this?
Below you can found the full link command and the error
g++ -g -DIN_GCC -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wwrite-strings -Wcast-qual -Wno-format -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -fno-common -DHAVE_CONFIG_H -o cc1 c/c-lang.o c-family/stub-objc.o attribs.o c/c-errors.o c/c-decl.o c/c-typeck.o c/c-convert.o c/c-aux-info.o c/c-objc-common.o c/c-parser.o c/c-array-notation.o c-family/c-common.o c-family/c-cppbuiltin.o c-family/c-dump.o c-family/c-format.o c-family/c-gimplify.o c-family/c-lex.o c-family/c-omp.o c-family/c-opts.o c-family/c-pch.o c-family/c-ppoutput.o c-family/c-pragma.o c-family/c-pretty-print.o c-family/c-semantics.o c-family/c-ada-spec.o c-family/c-cilkplus.o c-family/array-notation-common.o c-family/cilk.o c-family/c-ubsan.o i386-c.o glibc-c.o \
cc1-checksum.o libbackend.a main.o tree-browser.o libcommon-target.a libcommon.a ../libcpp/libcpp.a ../libdecnumber/libdecnumber.a libcommon.a ../libcpp/libcpp.a ../libbacktrace/.libs/libbacktrace.a ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a -lmpc -lmpfr -lgmp -rdynamic -ldl -L../zlib -lz
libbackend.a(ubsan.o): In function `ubsan_instrument_float_cast(unsigned int, tree_node*, tree_node*, tree_node*)':
/root/Desktop/gcc-5.5.0/host-x86_64-unknown-linux-gnu/gcc/../.././gcc/ubsan.c:1584: undefined reference to `mpfr_snprintf'
/root/Desktop/gcc-5.5.0/host-x86_64-unknown-linux-gnu/gcc/../.././gcc/ubsan.c:1598: undefined reference to `mpfr_snprintf'
collect2: ld returned 1 exit status
make[3]: *** [cc1] Error 1
make[3]: Leaving directory `/root/Desktop/gcc-5.5.0/host-x86_64-unknown-linux-gnu/gcc'
make[2]: *** [all-stage1-gcc] Error 2
make[2]: Leaving directory `/root/Desktop/gcc-5.5.0'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/root/Desktop/gcc-5.5.0'
make: *** [all] Error 2
 
Old 12-06-2017, 08:22 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,359

Rep: Reputation: 2333Reputation: 2333Reputation: 2333Reputation: 2333Reputation: 2333Reputation: 2333Reputation: 2333Reputation: 2333Reputation: 2333Reputation: 2333Reputation: 2333
You really should try google for this sort of thing. I just pasted mpfr_snprintf intop a search window and the second hit I got was http://www.mpfr.org/mpfr-2.4.1/ which seems to be what you're looking for.

You don't want a .c file - that's code. You want a library(.so), or possibly a header (.h)

Mandatory Warnings:
1. SuSE of any shade uses rpms, and automagic dependencies. When you start compiling on any rpm distro, IME you get about 2 years before you hit massive compatibility problems and a reinstall becomes wise.

2. Looks like you'll have to compile that. Once you've installed that with 'make install', I'm sure you'll put in stuff doesn't know is there. It's worth getting the SuSE rpm if such exists. Failing that, it's worth learning how to build rpms.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] compiling gcc undefined reference to orcaja Linux - Software 1 08-20-2013 08:48 AM
gcc does not show undefined reference error moonmoth Linux - Software 8 07-25-2010 04:33 PM
gcc linking: undefined reference to just about everything shabbychef Programming 7 09-09-2005 08:42 PM
gcc ld error. Undefined reference redness Linux - Software 4 02-08-2005 02:01 AM
Compile QT get Undefined reference jordban Linux - General 14 01-15-2005 06:58 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE

All times are GMT -5. The time now is 12:53 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration