Re: /usr/bin/ld: cannot find -lstdc++ on Red Hat Enterprise Linux release 8.9 (Ootpa)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On Tue, Apr 9, 2024 at 9:37 AM Kaushal Shriyan <kaushalshriyan@xxxxxxxxx> wrote:
Hi,

I am compiling the below application to generate livestatus.o file as per https://www.thruk.org/documentation/install.html#_livestatus

#cd /root/checkmk-1.2.8/livestatus
#./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for gcc-7... no
checking for clang-5.0... no
checking for gcc-6... no
checking for gcc-5... no
checking for clang-3.9... no
checking for clang-3.8... no
checking for clang-3.7... no
checking for clang-3.6... no
checking for clang-3.5... no
checking for clang-3.4... no
checking for gcc-4.9... no
checking for gcc-4.8... no
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking whether make supports the include directive... yes (GNU style)
checking dependency style of gcc... gcc3
checking for g++-7... no
checking for clang++-5.0... no
checking for g++-6... no
checking for g++-5... no
checking for clang++-3.9... no
checking for clang++-3.8... no
checking for clang++-3.7... no
checking for clang++-3.6... no
checking for clang++-3.5... no
checking for clang++-3.4... no
checking for g++-4.9... no
checking for g++-4.8... no
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking for ranlib... ranlib
checking for ar... ar
checking the archiver (ar) interface... ar
checking for socket in -lsocket... no
checking for connect in -lsocket... no
checking for shutdown in -lsocket... no
checking for dirent.h that defines DIR... yes
checking for library containing opendir... none required
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking for stdint.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for strings.h... (cached) yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking sys/timeb.h usability... yes
checking sys/timeb.h presence... yes
checking for sys/timeb.h... yes
checking syslog.h usability... yes
checking syslog.h presence... yes
checking for syslog.h... yes
checking for unistd.h... (cached) yes
checking for stdbool.h that conforms to C99... yes
checking for _Bool... yes
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking for int32_t... yes
checking for int64_t... yes
checking for size_t... yes
checking for ssize_t... yes
checking whether time.h and sys/time.h may both be included... yes
checking for uint32_t... yes
checking for uint64_t... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible realloc... yes
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
checking for sys/socket.h... (cached) yes
checking types of arguments for select... int,fd_set *,struct timeval *
checking return type of signal handlers... void
checking whether lstat correctly handles trailing slash... yes
checking whether stat accepts an empty string... no
checking for bzero... yes
checking for gettimeofday... yes
checking for memmove... yes
checking for regcomp... yes
checking for select... yes
checking for socket... yes
checking for strcasecmp... yes
checking for strdup... yes
checking for strerror... yes
checking for strtoul... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands

#make
g++  -s -fPIC -shared livestatus_so-AndingFilter.o livestatus_so-ClientQueue.o livestatus_so-Column.o livestatus_so-ColumnsColumn.o livestatus_so-CustomVarsExplicitColumn.o livestatus_so-ContactsColumn.o livestatus_so-CustomVarsColumn.o livestatus_so-CustomVarsFilter.o livestatus_so-DoubleColumn.o livestatus_so-DoubleColumnFilter.o livestatus_so-DowntimeOrComment.o livestatus_so-DownCommColumn.o livestatus_so-DynamicColumn.o livestatus_so-EmptyColumn.o livestatus_so-NullColumn.o livestatus_so-Filter.o livestatus_so-GlobalCountersColumn.o livestatus_so-HostContactsColumn.o livestatus_so-HostgroupsColumn.o livestatus_so-HostlistColumn.o livestatus_so-HostlistColumnFilter.o livestatus_so-HostlistStateColumn.o livestatus_so-MetricsColumn.o livestatus_so-HostSpecialIntColumn.o livestatus_so-ServiceSpecialIntColumn.o livestatus_so-InputBuffer.o livestatus_so-IntColumn.o livestatus_so-IntColumnFilter.o livestatus_so-ListColumn.o livestatus_so-ListColumnFilter.o livestatus_so-OffsetDoubleColumn.o livestatus_so-OffsetIntColumn.o livestatus_so-OffsetStringColumn.o livestatus_so-OffsetTimeperiodColumn.o livestatus_so-OringFilter.o livestatus_so-OutputBuffer.o livestatus_so-OffsetTimeColumn.o livestatus_so-TimePointerColumn.o livestatus_so-TimeColumnFilter.o livestatus_so-PerfdataAggregator.o livestatus_so-Query.o livestatus_so-ServiceContactsColumn.o livestatus_so-ServicegroupsColumn.o livestatus_so-ServicelistColumn.o livestatus_so-ServicelistColumnFilter.o livestatus_so-ServicelistStateColumn.o livestatus_so-store_c.o livestatus_so-Store.o livestatus_so-StringColumn.o livestatus_so-StringColumnFilter.o livestatus_so-strutil.o livestatus_so-Table.o livestatus_so-TableColumns.o livestatus_so-StatusSpecialIntColumn.o livestatus_so-HostSpecialDoubleColumn.o livestatus_so-TableCommands.o livestatus_so-TableContacts.o livestatus_so-TableDownComm.o livestatus_so-TableHostgroups.o livestatus_so-ServiceSpecialDoubleColumn.o livestatus_so-TableHosts.o livestatus_so-TableServicegroups.o livestatus_so-TableServices.o livestatus_so-TableStatus.o livestatus_so-LogEntry.o livestatus_so-LogCache.o livestatus_so-Logfile.o livestatus_so-TableStateHistory.o livestatus_so-TableLog.o livestatus_so-TableTimeperiods.o livestatus_so-TableContactgroups.o livestatus_so-ContactgroupsMemberColumn.o livestatus_so-OffsetStringMacroColumn.o livestatus_so-OffsetStringServiceMacroColumn.o livestatus_so-OffsetStringHostMacroColumn.o livestatus_so-StatsColumn.o livestatus_so-IntAggregator.o livestatus_so-CountAggregator.o livestatus_so-DoubleAggregator.o livestatus_so-AttributelistColumn.o livestatus_so-AttributelistFilter.o livestatus_so-BlobColumn.o livestatus_so-HostFileColumn.o livestatus_so-global_counters.o livestatus_so-module.o livestatus_so-logger.o livestatus_so-waittriggers.o livestatus_so-TimeperiodsCache.o livestatus_so-pnp4nagios.o livestatus_so-mk_inventory.o livestatus_so-ContactgroupsColumn.o livestatus_so-CustomTimeperiodColumn.o livestatus_so-HostServiceState.o livestatus_so-opids.o livestatus_so-auth.o -o livestatus.o -lpthread -static-libstdc++
/usr/bin/ld: cannot find -lstdc++
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:2535: livestatus.o] Error 1
make[2]: Leaving directory '/root/checkmk-1.2.8/livestatus/src'
make[1]: *** [Makefile:383: all-recursive] Error 1
make[1]: Leaving directory '/root/checkmk-1.2.8/livestatus'
make: *** [Makefile:324: all] Error 2

# rpm -qa | grep libstdc++
libstdc++-devel-8.5.0-20.el8.x86_64
libstdc++-8.5.0-20.el8.x86_64

#cat /etc/redhat-release
Red Hat Enterprise Linux release 8.9 (Ootpa)
#

I am not sure what is causing /usr/bin/ld: cannot find -lstdc++ when the above library is already present. Am I missing anything?

Please guide me.

Best Regards,

Kaushal


Hi,

Further to the previous email, I have followed these extra steps. 

#export LD_LIBRARY_PATH=/usr/lib/gcc/x86_64-redhat-linux/8
#echo $LD_LIBRARY_PATH
/usr/lib/gcc/x86_64-redhat-linux/8

#ls -l /usr/lib/gcc/x86_64-redhat-linux/8
total 5404
drwxr-xr-x 2 root root    4096 Apr  9 07:26 32
-rw-r--r-- 1 root root    2960 Jun 15  2023 crtbegin.o
-rw-r--r-- 1 root root    3200 Jun 15  2023 crtbeginS.o
-rw-r--r-- 1 root root    3480 Jun 15  2023 crtbeginT.o
-rw-r--r-- 1 root root    1632 Jun 15  2023 crtend.o
-rw-r--r-- 1 root root    1632 Jun 15  2023 crtendS.o
-rw-r--r-- 1 root root    4648 Jun 15  2023 crtfastmath.o
-rw-r--r-- 1 root root    1656 Jun 15  2023 crtoffloadbegin.o
-rw-r--r-- 1 root root    1648 Jun 15  2023 crtoffloadend.o
-rw-r--r-- 1 root root    1872 Jun 15  2023 crtoffloadtable.o
-rw-r--r-- 1 root root    4160 Jun 15  2023 crtprec32.o
-rw-r--r-- 1 root root    4168 Jun 15  2023 crtprec64.o
-rw-r--r-- 1 root root    4160 Jun 15  2023 crtprec80.o
drwxr-xr-x 3 root root    4096 Apr  3 09:03 include
-rw-r--r-- 1 root root      38 Jun 15  2023 libasan.so
-rw-r--r-- 1 root root   18128 Jun 15  2023 libasan_preinit.o
-rw-r--r-- 1 root root      40 Jun 15  2023 libatomic.so
-rw-r--r-- 1 root root 3157710 Jun 15  2023 libgcc.a
-rw-r--r-- 1 root root   59712 Jun 15  2023 libgcc_eh.a
-rw-r--r-- 1 root root     195 Jun 15  2023 libgcc_s.so
-rw-r--r-- 1 root root   76994 Jun 15  2023 libgcov.a
-rw-r--r-- 1 root root  425966 Jun 15  2023 libgomp.a
lrwxrwxrwx 1 root root      34 Jun 15  2023 libgomp.so -> ../../../../lib64/libgomp.so.1.0.0
-rw-r--r-- 1 root root     169 Jun 15  2023 libgomp.spec
-rw-r--r-- 1 root root     162 Jun 15  2023 libitm.spec
-rw-r--r-- 1 root root      38 Jun 15  2023 liblsan.so
-rw-r--r-- 1 root root   12040 Jun 15  2023 liblsan_preinit.o
-rw-r--r-- 1 root root     320 Jun 15  2023 libsanitizer.spec
lrwxrwxrwx 1 root root      37 Jun 15  2023 libstdc++.so -> ../../../../lib64/libstdc++.so.6.0.25
-rw-r--r-- 1 root root 1646900 Jun 15  2023 libstdc++fs.a
-rw-r--r-- 1 root root      38 Jun 15  2023 libtsan.so
-rw-r--r-- 1 root root    3944 Jun 15  2023 libtsan_preinit.o
-rw-r--r-- 1 root root      39 Jun 15  2023 libubsan.so
drwxr-xr-x 2 root root    4096 Apr  9 07:25 plugin
-rw-r--r-- 1 root root      24 Jun 15  2023 rpmver
 
I am still encountering the /usr/bin/ld: cannot find -lstdc++ issue. 

Please guide me. Thanks in advance.

Best Regards,

Kaushal

To unsubscribe from this group and stop receiving emails from it, send an email to redhat-list+unsubscribe@xxxxxxxxxx.

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux