From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg1-f193.google.com (mail-pg1-f193.google.com [209.85.215.193]) by sourceware.org (Postfix) with ESMTPS id 45D9B3857C41 for ; Fri, 11 Sep 2020 05:57:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 45D9B3857C41 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=saagarjha.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=saagarjha28@gmail.com Received: by mail-pg1-f193.google.com with SMTP id 34so5827141pgo.13 for ; Thu, 10 Sep 2020 22:57:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=QrphOaWBGPd6EyiFbfXSbqRDYgrtQqHLoVcpoMX7Mww=; b=A34+wbHZ7OWjNsIIfGykSZxje/zPtpL8GSbruboKe7H6YzCRHRChFC6Z7bg9ELXWPf RhL3XrUqRnqSpUxCvVcXmKh9Vgctnvc1pA6RL5rIjIQW60+zkIhhrACUFS/ralgB7rOR 8ioykX41bORTW/5WSk5pmm69orVjh4oOMPSD6xr1v9NfkdQQ6PHkkiN9pPedkUQGEcyB Daa+ZzhRsap6jngLw//1JI1X9wZeyyoCRAHpZQzbisFk7Zjb6jjJKE0QQ4NCKRzSDWpX tW36Q9NPLuQM1Sdwg9yZXadYaf8KLkqDU/gHry5xlyUqqSs2PwxbFLlj6GkvI0/a5bGE n6Rg== X-Gm-Message-State: AOAM532zBKNJLFILcIBtA6ndm666dad84i9zQGxUscbSMJYms6YDTVdb vXvI4h4D3kVMkgNxdpeBETE= X-Google-Smtp-Source: ABdhPJwomRb3njIbGX8wmBWAfQkOnf4yv6FQU8JMudjPySzIFDRiuBt8/kW9OjfJbeKXy1l2Ym1jlg== X-Received: by 2002:a17:902:7844:b029:d0:cbe1:e704 with SMTP id e4-20020a1709027844b02900d0cbe1e704mr741951pln.18.1599803825279; Thu, 10 Sep 2020 22:57:05 -0700 (PDT) Received: from localhost.localdomain (c-73-92-124-25.hsd1.ca.comcast.net. [73.92.124.25]) by smtp.gmail.com with ESMTPSA id gd17sm790142pjb.6.2020.09.10.22.57.03 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 10 Sep 2020 22:57:04 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.0.3.2.26\)) Subject: Re: [PATCH] Include string.h in elf-bfd.h From: Saagar Jha In-Reply-To: <5a0a8844-3b4f-b03d-60d2-a5f8b0f6c4a7@redhat.com> Date: Thu, 10 Sep 2020 22:57:02 -0700 Cc: binutils@sourceware.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <0E6E93AA-A1B9-44F2-BECB-1808058E3231@saagarjha.com> <8fbeb0d5-1e4b-2233-e555-a52c4afd8a36@redhat.com> <296F1157-C79B-4A4A-9F51-C1163A4E98EB@saagarjha.com> <5a0a8844-3b4f-b03d-60d2-a5f8b0f6c4a7@redhat.com> To: Nick Clifton X-Mailer: Apple Mail (2.3654.0.3.2.26) X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, KAM_SHORT, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Sep 2020 05:57:08 -0000 Perhaps I=E2=80=99m doing it wrong, but I stuck #include =E2=80=9Csysdep.h= " at the top of that configure test and it didn=E2=80=99t seem to like = it: configure:16833: gcc -o conftest -I./../include -I../bfd -I./../bfd -g = -O2 -L../bfd -L../libiberty -L../zlib conftest.c -lbfd -liberty -lz = ../intl/libintl.a -liconv -lncurses -lm >&5 In file included from conftest.c:171: ../bfd/sysdep.h:26:2: error: sysdep.h must be included in lieu of = config.h #error sysdep.h must be included in lieu of config.h ^ In file included from conftest.c:171: In file included from ../bfd/sysdep.h:29: ../bfd/config.h:310:9: warning: 'PACKAGE' macro redefined = [-Wmacro-redefined] #define PACKAGE "bfd" ^ conftest.c:26:9: note: previous definition is here #define PACKAGE "gdb" ^ In file included from conftest.c:171: In file included from ../bfd/sysdep.h:29: ../bfd/config.h:316:9: warning: 'PACKAGE_NAME' macro redefined = [-Wmacro-redefined] #define PACKAGE_NAME "bfd" ^ conftest.c:2:9: note: previous definition is here #define PACKAGE_NAME "" ^ In file included from conftest.c:171: In file included from ../bfd/sysdep.h:29: ../bfd/config.h:319:9: warning: 'PACKAGE_STRING' macro redefined = [-Wmacro-redefined] #define PACKAGE_STRING "bfd 2.35.50" ^ conftest.c:5:9: note: previous definition is here #define PACKAGE_STRING "" ^ In file included from conftest.c:171: In file included from ../bfd/sysdep.h:29: ../bfd/config.h:322:9: warning: 'PACKAGE_TARNAME' macro redefined = [-Wmacro-redefined] #define PACKAGE_TARNAME "bfd" ^ conftest.c:3:9: note: previous definition is here #define PACKAGE_TARNAME "" ^ In file included from conftest.c:171: In file included from ../bfd/sysdep.h:29: ../bfd/config.h:328:9: warning: 'PACKAGE_VERSION' macro redefined = [-Wmacro-redefined] #define PACKAGE_VERSION "2.35.50" ^ conftest.c:4:9: note: previous definition is here #define PACKAGE_VERSION "" ^ In file included from conftest.c:171: ../bfd/sysdep.h:185:11: fatal error: 'libintl.h' file not found # include ^~~~~~~~~~~ 5 warnings and 2 errors generated. configure:16833: $? =3D 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "" | #define PACKAGE_TARNAME "" | #define PACKAGE_VERSION "" | #define PACKAGE_STRING "" | #define PACKAGE_BUGREPORT "" | #define PACKAGE_URL "" | #define STDC_HEADERS 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_MEMORY_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_UNISTD_H 1 | #define __EXTENSIONS__ 1 | #define _ALL_SOURCE 1 | #define _GNU_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define _TANDEM_SOURCE 1 | #define HAVE_DLFCN_H 1 | #define HAVE_CXX11 1 | #define ENABLE_NLS 1 | #define PACKAGE "gdb" | #define DEBUGDIR "/tmp/gdb/lib/debug" | #define DEBUGDIR_RELOCATABLE 1 | #define BINDIR "/tmp/gdb/bin" | #define GDB_DATADIR "/tmp/gdb/share/gdb" | #define GDB_DATADIR_RELOCATABLE 1 | #define AUTO_LOAD_DIR ":${prefix}/share/auto-load" | #define AUTO_LOAD_SAFE_PATH ":${prefix}/share/auto-load" | #define DEFAULT_BFD_ARCH bfd_aarch64_arch | #define DEFAULT_BFD_VEC aarch64_mach_o_vec | #define HAVE_MONSTARTUP 1 | #define PKGVERSION "(GDB) " | #define REPORT_BUGS_TO "" | #define HAVE_LIBM 1 | #define HAVE_ICONV 1 | #define ICONV_CONST=20 | #define SIZEOF_UNSIGNED_LONG_LONG 8 | #define SIZEOF_UNSIGNED_LONG 8 | #define SIZEOF_UNSIGNED___INT128 16 | #define JIT_READER_DIR "/tmp/gdb/lib/gdb" | #define JIT_READER_DIR_RELOCATABLE 1 | #define HAVE_LIBEXPAT 1 | #define HAVE_XML_STOPPARSER 1 | #define WITH_PYTHON_PATH = "/System/Library/Frameworks/Python.framework/Versions/2.7" | #define PYTHON_PATH_RELOCATABLE 0 | #define HAVE_PYTHON 1 | #define WITH_PYTHON_LIBDIR = "/System/Library/Frameworks/Python.framework/Versions/2.7/lib" | #define PYTHON_LIBDIR_RELOCATABLE 0 | #define STDC_HEADERS 1 | #define HAVE_NLIST_H 1 | #define HAVE_SYS_FILE_H 1 | #define HAVE_SYS_FILIO_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_RESOURCE_H 1 | #define HAVE_SYS_PTRACE_H 1 | #define HAVE_TERMIOS_H 1 | #define HAVE_SYS_USER_H 1 | #define HAVE_CURSES_H 1 | #define HAVE_NCURSES_H 1 | #define HAVE_TERM_H 1 | #define HAVE_SYS_SOCKET_H 1 | #define HAVE_LONG_LONG 1 | #define SIZEOF_LONG_LONG 8 | #define HAVE_DECL_BASENAME 0 | #define HAVE_DECL_FFS 1 | #define HAVE_DECL_ASPRINTF 1 | #define HAVE_DECL_VASPRINTF 1 | #define HAVE_DECL_SNPRINTF 1 | #define HAVE_DECL_VSNPRINTF 1 | #define HAVE_DECL_STRTOL 1 | #define HAVE_DECL_STRTOUL 1 | #define HAVE_DECL_STRTOLL 1 | #define HAVE_DECL_STRTOULL 1 | #define HAVE_DECL_STRVERSCMP 0 | #define HAVE_DECL_SNPRINTF 1 | #define HAVE_LC_MESSAGES 1 | #define HAVE_SOCKLEN_T 1 | #define HAVE_GETUID 1 | #define HAVE_GETGID 1 | #define HAVE_PIPE 1 | #define HAVE_PREAD 1 | #define HAVE_PWRITE 1 | #define HAVE_RESIZE_TERM 1 | #define HAVE_GETPGID 1 | #define HAVE_SETSID 1 | #define HAVE_SIGACTION 1 | #define HAVE_SIGSETMASK 1 | #define HAVE_SOCKETPAIR 1 | #define HAVE_WBORDER 1 | #define HAVE_WRESIZE 1 | #define HAVE_SETLOCALE 1 | #define HAVE_BTOWC 1 | #define HAVE_SETRLIMIT 1 | #define HAVE_GETRLIMIT 1 | #define HAVE_POSIX_MADVISE 1 | #define HAVE_WAITPID 1 | #define HAVE_USE_DEFAULT_COLORS 1 | #define HAVE_LANGINFO_CODESET 1 | #define HAVE_STDLIB_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_SYS_PARAM_H 1 | #define STDC_HEADERS 1 | #define HAVE_ALLOCA_H 1 | #define HAVE_ALLOCA 1 | #define HAVE_LANGINFO_CODESET 1 | #define HAVE_LOCALE_H 1 | #define HAVE_MEMORY_H 1 | #define HAVE_SIGNAL_H 1 | #define HAVE_SYS_RESOURCE_H 1 | #define HAVE_SYS_SOCKET_H 1 | #define HAVE_SYS_UN_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_TERMIOS_H 1 | #define HAVE_DLFCN_H 1 | #define HAVE_POLL_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_GETPAGESIZE 1 | #define HAVE_MMAP 1 | #define HAVE_FORK 1 | #define HAVE_VFORK 1 | #define HAVE_WORKING_VFORK 1 | #define HAVE_WORKING_FORK 1 | #define HAVE_GETRLIMIT 1 | #define HAVE_PIPE 1 | #define HAVE_POLL 1 | #define HAVE_SOCKETPAIR 1 | #define HAVE_SIGACTION 1 | #define HAVE_SBRK 1 | #define HAVE_SIGALTSTACK 1 | #define HAVE_SIGPROCMASK 1 | #define HAVE_SETPGID 1 | #define HAVE_SETPGRP 1 | #define HAVE_GETRUSAGE 1 | #define HAVE_DECL_ADDR_NO_RANDOMIZE 0 | #define HAVE_DECL_STRSTR 1 | #define HAVE_STRUCT_STAT_ST_BLOCKS 1 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | #define HAVE_PTHREAD_PRIO_INHERIT 1 | #define HAVE_PTHREAD_SIGMASK 1 | #define HAVE_PTHREAD_SETNAME_NP 1 | #define CXX_STD_THREAD 1 | #define HAVE_SIGSETJMP 1 | #define _STRUCTURED_PROC 1 | #define HAVE_SYS_PTRACE_H 1 | #define PTRACE_TYPE_RET int | #define PTRACE_TYPE_ARG1 int | #define PTRACE_TYPE_ARG3 caddr_t | #define PTRACE_TYPE_ARG4 int | #define SETPGRP_VOID 1 | #define USE_INCLUDED_REGEX 1 | #define PRINTF_HAS_LONG_LONG 1 | #define HAVE_LONG_DOUBLE 1 | #define PRINTF_HAS_LONG_DOUBLE 1 | #define SCANF_HAS_LONG_DOUBLE 1 | #define GDBINIT ".gdbinit" | #define TARGET_SYSTEM_ROOT "" | #define TARGET_SYSTEM_ROOT_RELOCATABLE 0 | #define SYSTEM_GDBINIT "" | #define SYSTEM_GDBINIT_RELOCATABLE 0 | #define SYSTEM_GDBINIT_DIR "" | #define SYSTEM_GDBINIT_DIR_RELOCATABLE 0 | /* end confdefs.h. */ | #include | #include "sysdep.h" | #include "bfd.h" | #include "elf-bfd.h" |=20 | int | main () | { | return bfd_get_elf_phdr_upper_bound (NULL); | ; | return 0; | } configure:16841: result: no Is there something else I should be doing? > On Sep 9, 2020, at 05:07, Nick Clifton wrote: >=20 > Hi Saagar, >=20 >> but if it=E2=80=99s just this instance we can just include the right = header in the test. Would that be =E2=80=9Csysdep.h=E2=80=9D? >=20 > Yes. I am assuming that at the point where this test is run, = configure will have > completed in the bfd directory and that the bfd/config.h header will = have been > created. The bfd/sysdep.h header needs that header in order to = correctly choose > between and . >=20 > Cheers > Nick >=20 >=20