#40998 closed defect (invalid)
libgcc @4.8.1 Compile error on Mavericks macports 2.2.1 package (Error: conflicting declaration 'typedef enum pointer_t pointer_t')
Reported by: | William.Capehart@… | Owned by: | mww@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.2.1 |
Keywords: | mavericks | Cc: | jeremyhu (Jeremy Huddleston Sequoia), cooljeanius (Eric Gallager), lzkelley (Luke), larryv (Lawrence Velázquez) |
Port: | libgcc |
Description (last modified by mf2k (Frank Schima))
Macports' Mavericks 2.2.1 package has been removed and reinstalled several times. Xcode license has been accepted several times. xcode-select --install has been installed. I've also done the normal selfupdate step. From what I've seen I've covered most of what other people who have reported simpler problems with libgcc and gcc4x compile errors have done. From what I can see, this does not resemble the error in #40857 or #40810, for example.
Attempts to install GCC 4.8 and 4.7 have been blocked by the same error each time with the following error in the libgcc build. (each attempt has been preceded by a clean of gcc48/gcc47 and libgcc)
The same error emerges when installing ONLY libgcc. The error message for the libgcc build is below and log is attached.
Note that fortran is a critical requirement for me. I should not disable this. Additionally installing gcc48 on macports a month ago met with no error.
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc48/libgcc/work/gcc-4.8.1/gcc/fortran/module.c:110:1: error: conflicting declaration 'typedef enum pointer_t pointer_t' pointer_t; ^ In file included from /usr/include/mach/memory_object_types.h:77:0, from /usr/include/mach/mach_types.h:85, from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc48/libgcc/work/build/prev-gcc/include-fixed/malloc.h:37, from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc48/libgcc/work/gcc-4.8.1/gcc/system.h:460, from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc48/libgcc/work/gcc-4.8.1/gcc/fortran/module.c:68: /usr/include/mach/vm_types.h:40:26: error: 'pointer_t' has a previous declaration as 'typedef vm_offset_t pointer_t' typedef vm_offset_t pointer_t; ^ make[3]: *** [fortran/module.o] Error 1
Attachments (1)
Change History (26)
Changed 11 years ago by William.Capehart@…
comment:1 Changed 11 years ago by mf2k (Frank Schima)
Cc: | jeremyhu@… added |
---|---|
Description: | modified (diff) |
Keywords: | Mavericks libgcc pointer_t removed |
Owner: | changed from macports-tickets@… to mww@… |
Port: | @4.8.1 removed |
In the future, please use WikiFormatting and Cc the port maintainers (port info --maintainers libgcc
).
comment:2 Changed 11 years ago by William.Capehart@…
I have found what is likely not a best practices-friendly solution by trespassing into the /usr area:
I have commented-out line 40 of /usr/include/mach/vm_types.h Before this, I DID try to comment out its counterpart line in libgcc/work/gcc-4.8.1/gcc/fortran/module.c but this produced far more errors, and went to vm_types.h instead. I was able to compile libgcc (4.8.2) and gcc48. And I restored the vm_types.h to before and moved forward with building mpich, netcdf, and other macport builds. I have only had a problem with ncarg but that may be an unrelated matter and am submitting the problem there' under separate cover.
I do not know if this qualifies as a "works for me fix."
comment:3 Changed 11 years ago by William.Capehart@…
I just tried to repeat this build on my second newly upgraded Mavericks machine and got the same error. I did not make any changes to /usr/include/mach/vm_types.h for this second machine.
comment:4 Changed 11 years ago by jeremyhu (Jeremy Huddleston Sequoia)
I can't reproduce, and this is GPL3 code, so I'm not going to be looking at it. My suggestion is to remove the conflicting typedef in gcc's sources or otherwise fix it there.
comment:5 Changed 11 years ago by jeremyhu (Jeremy Huddleston Sequoia)
Keywords: | mavericks added |
---|
comment:8 Changed 10 years ago by lzkelley (Luke)
I'm getting (I think) the same error trying to install libgcc on yosemite: #45758
Currently trying @William.Capehart@… solution to comment out the line in vm_types.h
comment:11 Changed 10 years ago by larryv (Lawrence Velázquez)
Can someone experiencing this issue upload a complete log from a single-threaded build?
% sudo port clean libgcc % sudo port install libgcc build.jobs=1
comment:12 Changed 10 years ago by larryv (Lawrence Velázquez)
:info:build from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc49/libgcc/work/build/prev-gcc/include-fixed/malloc.h:37,
What?
:info:build Fixing headers into /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc49/libgcc/work/build/gcc/include-fixed for x86_64-apple-darwin14 target :info:build No forbidden identifiers defined by this target :info:build Finding directories and links to directories :info:build Searching /usr/include/. :info:build Searching /usr/include/./python2.6 :info:build Searching /usr/include/./python2.7 :info:build Making symbolic directory links :info:build Fixing directory /usr/include into /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc49/libgcc/work/build/gcc/include-fixed :info:build Applying ctrl_quotes_def to editline/readline.h :info:build Applying stdio_va_list_clients to krb5.h :info:build Applying sun_malloc to malloc.h :info:build Fixed: malloc.h :info:build Applying hpux8_bogus_inlines to math.h :info:build Applying math_exception to math.h :info:build Fixed: math.h :info:build Applying io_quotes_def to net/if_media.h :info:build Applying io_quotes_def to net-snmp/library/container.h :info:build Applying ctrl_quotes_def to readline/history.h :info:build Applying ctrl_quotes_def to readline/readline.h :info:build Applying io_quotes_use to security/audit/audit_ioctl.h :info:build Applying darwin_stdint_1 to stdint.h :info:build Applying darwin_stdint_2 to stdint.h :info:build Applying darwin_stdint_3 to stdint.h :info:build Applying darwin_stdint_4 to stdint.h :info:build Applying darwin_stdint_5 to stdint.h :info:build Applying darwin_stdint_6 to stdint.h :info:build Applying darwin_stdint_7 to stdint.h :info:build Fixed: stdint.h :info:build Applying sysv68_string to string.h :info:build Applying io_quotes_def to sys/cdefs.h :info:build Applying io_quotes_def to sys/ioccom.h :info:build Applying io_quotes_def to sys/ttycom.h :info:build Applying io_quotes_use to sys/ttycom.h :info:build Fixing directory /usr/include/python2.6 into /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc49/libgcc/work/build/gcc/include-fixed/root/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 :info:build Fixing directory /usr/include/python2.7 into /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc49/libgcc/work/build/gcc/include-fixed/root/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 :info:build Cleaning up unneeded directories: :info:build fixincludes is done
Why is the SunOS malloc fix being applied (“Applying sun_malloc”)? I’m not seeing this behavior in my Mavericks VM:
:info:build Fixing headers into /opt/local/var/macports/build/_Users_larryv_Projects_MacPorts_git-svn_trunk_dports_lang_gcc49/libgcc/work/build/gcc/include-fixed for x86_64-apple-darwin13 target :info:build No forbidden identifiers defined by this target :info:build Finding directories and links to directories :info:build Searching /usr/include/. :info:build Searching /usr/include/./python2.5 :info:build Searching /usr/include/./python2.6 :info:build Searching /usr/include/./python2.7 :info:build Making symbolic directory links :info:build Fixing directory /usr/include into /opt/local/var/macports/build/_Users_larryv_Projects_MacPorts_git-svn_trunk_dports_lang_gcc49/libgcc/work/build/gcc/include-fixed :info:build Applying io_quotes_def to apache2/modperl_common_util.h :info:build Applying ctrl_quotes_def to editline/readline.h :info:build Applying stdio_va_list_clients to krb5.h :info:build Applying hpux8_bogus_inlines to math.h :info:build Applying math_exception to math.h :info:build Fixed: math.h :info:build Applying io_quotes_def to net/if_media.h :info:build Applying io_quotes_def to net-snmp/library/container.h :info:build Applying ctrl_quotes_def to readline/history.h :info:build Applying ctrl_quotes_def to readline/readline.h :info:build Applying io_quotes_use to security/audit/audit_ioctl.h :info:build Applying darwin_stdint_1 to stdint.h :info:build Applying darwin_stdint_2 to stdint.h :info:build Applying darwin_stdint_3 to stdint.h :info:build Applying darwin_stdint_4 to stdint.h :info:build Applying darwin_stdint_5 to stdint.h :info:build Applying darwin_stdint_6 to stdint.h :info:build Applying darwin_stdint_7 to stdint.h :info:build Fixed: stdint.h :info:build Applying sysv68_string to string.h :info:build Applying io_quotes_def to sys/cdefs.h :info:build Applying io_quotes_def to sys/ioccom.h :info:build Applying io_quotes_def to sys/ttycom.h :info:build Applying io_quotes_use to sys/ttycom.h :info:build Fixing directory /usr/include/python2.5 into /opt/local/var/macports/build/_Users_larryv_Projects_MacPorts_git-svn_trunk_dports_lang_gcc49/libgcc/work/build/gcc/include-fixed/root/System/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 :info:build Fixing directory /usr/include/python2.6 into /opt/local/var/macports/build/_Users_larryv_Projects_MacPorts_git-svn_trunk_dports_lang_gcc49/libgcc/work/build/gcc/include-fixed/root/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 :info:build Fixing directory /usr/include/python2.7 into /opt/local/var/macports/build/_Users_larryv_Projects_MacPorts_git-svn_trunk_dports_lang_gcc49/libgcc/work/build/gcc/include-fixed/root/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 :info:build Cleaning up unneeded directories: :info:build fixincludes is done
comment:13 follow-up: 14 Changed 10 years ago by larryv (Lawrence Velázquez)
Can someone tell me what this produces on their system?
% find /usr/include -name malloc.h
comment:14 follow-up: 15 Changed 10 years ago by William.Capehart@…
Replying to larryv@…:
Can someone tell me what this produces on their system?
% find /usr/include -name malloc.h
for me it is
% find /usr/include -name malloc.h /usr/include/malloc/malloc.h /usr/include/malloc.h /usr/include/sys/malloc.h
comment:15 follow-up: 16 Changed 10 years ago by larryv (Lawrence Velázquez)
Replying to William.Capehart@…:
/usr/include/malloc.h
There should not be a malloc.h
in /usr/include
. Do you know how it got there?
comment:16 follow-up: 17 Changed 10 years ago by lzkelley (Luke)
Replying to larryv@…:
Replying to William.Capehart@…:
/usr/include/malloc.hThere should not be a
malloc.h
in/usr/include
. Do you know how it got there?
I have the same malloc.h
as @William.Capehart. The /usr/include/malloc.h
is a symlink to /usr/include/malloc/malloc.h
and the file starts with:
/* * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * * This file contains Original Code and/or Modifications of Original Code * as defined in and that are subject to the Apple Public Source License * Version 2.0 (the 'License'). You may not use this file except in * compliance with the License. Please obtain a copy of the License at * http://www.opensource.apple.com/apsl/ and read it before using this * file. * * The Original Code and all software distributed under the License are * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. * Please see the License for the specific language governing rights and * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */
Perhaps it has something to do with developer tools?
comment:17 follow-up: 18 Changed 10 years ago by larryv (Lawrence Velázquez)
Replying to lkelley@…:
Perhaps it has something to do with developer tools?
The /usr/include/{malloc,sys}/malloc.h
are fine; they’re installed by the Xcode Command Line Tools. /usr/include/malloc.h
is a non-standard header that basically no systems install anymore.
The problem is that GCC’s build sees this mystery symlink /usr/include/malloc.h
, assumes that you’re running SunOS, and fixes up its own copy. This screws up includes later on.
What’s the output of this, if any?
% pkgutil --file-info /usr/include/malloc.h
comment:18 Changed 10 years ago by lzkelley (Luke)
Replying to larryv@…:
Replying to lkelley@…:
Perhaps it has something to do with developer tools?
The
/usr/include/{malloc,sys}/malloc.h
are fine; they’re installed by the Xcode Command Line Tools./usr/include/malloc.h
is a non-standard header that basically no systems install anymore.The problem is that GCC’s build sees this mystery symlink
/usr/include/malloc.h
, assumes that you’re running SunOS, and fixes up its own copy. This screws up includes later on.What’s the output of this, if any?
% pkgutil --file-info /usr/include/malloc.h
Nothing:
volume: / path: /usr/include/malloc.h
comment:19 follow-up: 20 Changed 10 years ago by jeremyhu (Jeremy Huddleston Sequoia)
Well then is it possible that you put it there yourself? Perhaps years ago, you got an error about malloc.h not being found during a compile, and you followed some advice on stackoverflow.com that told you to symlink malloc.h to stdlib.h or something like that.
comment:20 follow-up: 21 Changed 10 years ago by lzkelley (Luke)
Replying to jeremyhu@…:
Well then is it possible that you put it there yourself? Perhaps years ago, you got an error about malloc.h not being found during a compile, and you followed some advice on stackoverflow.com that told you to symlink malloc.h to stdlib.h or something like that.
I'd call that *possible*. The files were last modified fairly recently, however (but before I installed 10.10). It'd be interesting to hear if @William.Capehart has any other details
comment:21 follow-up: 22 Changed 10 years ago by larryv (Lawrence Velázquez)
Or maybe a rogue build/installer took it upon itself to diddle with your /usr/include
?
In any case, you need to get rid of that symlink.
comment:22 follow-up: 23 Changed 10 years ago by lzkelley (Luke)
Replying to larryv@…:
Or maybe a rogue build/installer took it upon itself to diddle with your
/usr/include
?In any case, you need to get rid of that symlink.
done.
comment:23 follow-up: 25 Changed 10 years ago by larryv (Lawrence Velázquez)
Resolution: | → invalid |
---|---|
Status: | new → closed |
Okay, that should take care of the issue. Run these commands, and you should be set.
% sudo port clean libgcc % sudo port selfupdate % sudo port install libgcc
If you run into the mystery software that needs /usr/include/malloc.h
, kindly tell its authors to cut it out.
comment:24 Changed 10 years ago by William.Capehart@…
I have no specific recollection of putting /usr/include/malloc.h in there but I must wonder if it was associated with the HPC gcc compiler set that Mac users can get at source forge?
But if it's not supposed to be there in the naturalistic mac environment I certainly can make it go away. Thanks for the help on this.
comment:25 Changed 10 years ago by lzkelley (Luke)
Replying to larryv@…:
Okay, that should take care of the issue. Run these commands, and you should be set.
% sudo port clean libgcc % sudo port selfupdate % sudo port install libgccIf you run into the mystery software that needs
/usr/include/malloc.h
, kindly tell its authors to cut it out.
libgcc installed successfully! Thank you!
opt_local_var_macports_logsopt_local_var_macports_sources_rsync_macports.org_release_tarballs_ports_lang_gcc48_libgcc_main.log