In addition to Weibo, there is also WeChat
Please pay attention

WeChat public account
Shulou
 
            
                     
                
2025-10-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article introduces the relevant knowledge of "errors encountered in compiling glibc Error: invalid identifier for" .ifdef "how to solve". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
Because the default glibc version of the CentOS6 system is lower, I encountered Error: invalid identifier for ".ifdef" when trying to compile and upgrade, and record the solution here.
Compilation and installation
Download from the official website: ftp://ftp.gnu.org/gnu/glibc/
Download and compile and install wget http://ftp.gnu.org/gnu/glibc/glibc-2.15.tar.gzwget http://ftp.gnu.org/gnu/glibc/glibc-ports-2.15.tar.gztar-zxf glibc-2.15.tar.gztar-zxf glibc-ports-2.15.tar.gzmv glibc-ports-2.15 glibc-2.15/portsmkdir glibc-build-2.15cd glibc-build-2.15../glibc-2.15/configure- Prefix=/usr-- disable-profile-- enable-add-ons-- with-headers=/usr/include-- with-binutils=/usr/binmake all & & make install solves the error sysdeps/i386/fpu/s_frexp.S:66: Error: invalid identifier for ".ifdef" 1. Modify the file pt-initfini.c
Find the file nptl/sysdeps/pthread/pt-initfini.c in the glibc source directory, about 46 lines: asm ("\ n#include\" defs.h\ "")
Add code after that:
Asm ("\ n#if defined _ i686 & & defined _ ASSEMBLER__"); asm ("\ n#undef _ i686"); asm ("\ n#define _ i686 _ i686"); asm ("\ n#endif"); 2. Modify the file sysdep.h
Find the file sysdeps/unix/sysv/linux/i386/sysdep.h in the glibc source directory, about 30 lines: # include
Add code after that:
# if defined _ i686 & & defined _ ASSEMBLER__#undef _ i686#define _ i686 _ i686#endif3. Recompile make all & & make install to determine the current GLIBC version ldd-- version
Install successfully as follows
Ldd (GNU libc) 2.15Copyright (C) 2012 Free Software Foundation, Inc.This is free software; see the source for copying conditions. There is NOwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.Written by Roland McGrath and Ulrich Drepper. "errors encountered in compiling glibc Error: invalid identifier for" .ifdef "how to solve" is introduced here, thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about

The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r


A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from

Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope





 
             
            About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.