Opened 12 years ago

Closed 9 years ago

Last modified 9 years ago

#34639 closed defect (wontfix)

gdc @0.24 Build failure due to redefinition of functions

Reported by: biz@… Owned by: mww@…
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: mojca (Mojca Miklavec), nils.hjelte@…, dchapman2146, kurthindenburg (Kurt Hindenburg), tenomoto (Takeshi Enomoto)
Port: gdc

Description

:info:build .../macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gdc/gdc/work/gcc-4.1.2/gcc/toplev.c:524:1: 
          error: redefinition of a 'extern inline' function 'floor_log2' is not supported in C99 mode
:info:build floor_log2 (unsigned HOST_WIDE_INT x)
:info:build ^
:info:build .../macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gdc/gdc/work/gcc-4.1.2/gcc/toplev.h:175:1: note: previous definition is here
:info:build floor_log2 (unsigned HOST_WIDE_INT x)
:info:build ^
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gdc/gdc/work/gcc-4.1.2/gcc/toplev.c:559:1: 
          error: redefinition of a 'extern inline' function 'exact_log2' is not supported in C99 mode
:info:build exact_log2 (unsigned HOST_WIDE_INT x)
:info:build ^
:info:build .../macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gdc/gdc/work/gcc-4.1.2/gcc/toplev.h:181:1: note: previous definition is here
:info:build exact_log2 (unsigned HOST_WIDE_INT x)
:info:build ^
:info:build 4 warnings and 2 errors generated.

Attachments (3)

main.log (3.2 MB) - added by biz@… 12 years ago.
main.log from error'd build
patch-gcc-toplev.c.diff (603 bytes) - added by jmroot (Joshua Root) 12 years ago.
gdc.log (213.4 KB) - added by splaisan (Stephane Plaisance) 11 years ago.
@0.24_2 failing under mavericks

Change History (15)

comment:1 Changed 12 years ago by mf2k (Frank Schima)

Owner: changed from macports-tickets@… to mww@…
Port: gdc added

In the future, please fill in the Port field and Cc the maintainer(s).

Please clean and try again. If it fails, attach the complete main.log file.

Changed 12 years ago by biz@…

Attachment: main.log added

main.log from error'd build

Changed 12 years ago by jmroot (Joshua Root)

Attachment: patch-gcc-toplev.c.diff added

comment:2 Changed 12 years ago by jmroot (Joshua Root)

Summary: gdc @0.24 Build failure OSX Lion Xcode 4.3.2gdc @0.24 Build failure due to redefinition of functions

Attached patch disables the extra definitions that cause the error in the log, but the symbols are still multiply defined elsewhere. There's probably not much point messing around more with this version, based on gcc 4.1.2; rather updating should be the first step.

comment:3 Changed 11 years ago by mojca (Mojca Miklavec)

Cc: mojca@… added

Cc Me!

Changed 11 years ago by splaisan (Stephane Plaisance)

Attachment: gdc.log added

@0.24_2 failing under mavericks

comment:4 Changed 10 years ago by nils.hjelte@…

Cc: nils.hjelte@… added

Cc Me!

comment:5 Changed 9 years ago by mojca (Mojca Miklavec)

Cc: dchapman2146@… khindenburg@… takeshi@… added
Version: 2.1.1

Duplicate: #50372.

As noted in the other ticket the development is now at ​https://github.com/D-Programming-GDC/GDC and supports all branches of GCC, including the development version (6) and the latest release 5.x.

This port hasn't been touched for five years and the last "functional" change was almost nine years ago (r28291). Most likely nobody has a working version of the port anyway. It breaks even on 10.7, not just on 10.11 (I didn't test 10.6 or earlier yet).

My suggestion would be to simply delete this port that still depends on GCC 4.1 and wait until someone submits a port for GCC 5.3 (potentially allowing multiple versions like gcc-4.9, gcc-5, gcc-6 etc.). I'm almost sure that the current port won't help towards the new port in any way at all.

Victims of removal of gdc include:

  • wxd (one of the problems with that port is that support for wxWidgets 3 is somewhat questionable even though some old notes claim compatibility with wxWidgets 2.9.2, but I wasn't able to test anything at all, latest commits are from 2011)
  • D bindings of plplot (just a variant)

comment:6 Changed 9 years ago by tenomoto (Takeshi Enomoto)

I am thinking of replacing gdc with dmd for the plplot variant. But I haven't done anything yet.

comment:7 Changed 9 years ago by mojca (Mojca Miklavec)

There seem to be three flavours of compilers according to https://dlang.org/download.html:

  • DMD (official compiler, dmd package maintained by takeshi and almost the latest version)
  • GDC (based on GCC: this one, horribly outdated and broken)
  • LDC (based on LLVM; no macports package available yet)

Until we get an up-to-date GDC, DMD could probably be used (without confusing users and making them believe that they might be able to install GDC).

comment:8 Changed 9 years ago by mojca (Mojca Miklavec)

Resolution: wontfix
Status: newclosed

I removed the port in r147992, see also #50917. Takeshi, please update plplot.

If anyone needs this port, it should be written from scratch for the latest available version rather than giving users impression that we have a port that hasn't been touched for a decade.

comment:9 Changed 9 years ago by tenomoto (Takeshi Enomoto)

I'll see if I can replace gdc with dmd in plplot.

comment:10 Changed 9 years ago by tenomoto (Takeshi Enomoto)

Made gdc variant obsolete and added dmd variant in r148005. It wasn't easy!

comment:11 Changed 9 years ago by mojca (Mojca Miklavec)

Thank you.

Not that it really matters because I don't believe that anyone has +gdc variant installed (it has been broken for too long already), but you could do something in the spirit of

if { [variant_isset gdc] } {
    default_variants-append dmd
}

Then again ... you don't want to encourage users to start using +gdc anyway, so you can leave it as it is.

comment:12 Changed 9 years ago by tenomoto (Takeshi Enomoto)

Yes, I could have done as you suggested. Done is r148039.

Note: See TracTickets for help on using tickets.