Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#54878 closed defect (fixed)

ghc @7.8.3_5: Failed to build on macOS 10.13

Reported by: vovinacci (Volodymyr 'vovin' Shcherbinin) Owned by: neverpanic (Clemens Lang)
Priority: Normal Milestone:
Component: ports Version: 2.4.99
Keywords: highsierra Cc:
Port: ghc

Description (last modified by raimue (Rainer Müller))

ghc@7.8.3_5: Failed to build on macOS 10.13

:info:build ===--- building final phase
:info:build /Applications/Xcode.app/Contents/Developer/usr/bin/make -r --no-print-directory -f ghc.mk phase=final all
...
:info:build "inplace/bin/ghc-stage1" -optc-m64 -optc-fno-stack-protector -optc-Wall -optc-Wextra -optc-Wstrict-prototypes -optc-Wmissing-prototypes -optc-Wmissing-declarations -optc-Winline -optc-Waggregate-return -optc-Wpointer-arith -optc-Wmissing-noreturn -optc-Wnested-externs -optc-Wredundant-decls -optc-Iincludes -optc-Iincludes/dist -optc-Iincludes/dist-derivedconstants/header -optc-Iincludes/dist-ghcconstants/header -optc-Irts -optc-Irts/dist/build -optc-DCOMPILING_RTS -optc-fno-strict-aliasing -optc-fno-common -optc-DDTRACE -optc-O2 -optc-fomit-frame-pointer -optc-DDYNAMIC -optc-DRtsWay=\"rts_dyn\" -fPIC -dynamic  -H32m -O -Iincludes -Iincludes/dist -Iincludes/dist-derivedconstants/header -Iincludes/dist-ghcconstants/header -Irts -Irts/dist/build -DCOMPILING_RTS -package-name rts -dcmm-lint  -DDTRACE     -i -irts -irts/dist/build -irts/dist/build/autogen -Irts/dist/build -Irts/dist/build/autogen           -O2    -c rts/FileLock.c -o rts/dist/build/FileLock.dyn_o
:info:build "inplace/bin/ghc-stage1" -optc-m64 -optc-fno-stack-protector -optc-Wall -optc-Wextra -optc-Wstrict-prototypes -optc-Wmissing-prototypes -optc-Wmissing-declarations -optc-Winline -optc-Waggregate-return -optc-Wpointer-arith -optc-Wmissing-noreturn -optc-Wnested-externs -optc-Wredundant-decls -optc-Iincludes -optc-Iincludes/dist -optc-Iincludes/dist-derivedconstants/header -optc-Iincludes/dist-ghcconstants/header -optc-Irts -optc-Irts/dist/build -optc-DCOMPILING_RTS -optc-fno-strict-aliasing -optc-fno-common -optc-DDTRACE -optc-O2 -optc-fomit-frame-pointer -optc-DDYNAMIC -optc-DRtsWay=\"rts_dyn\" -fPIC -dynamic  -H32m -O -Iincludes -Iincludes/dist -Iincludes/dist-derivedconstants/header -Iincludes/dist-ghcconstants/header -Irts -Irts/dist/build -DCOMPILING_RTS -package-name rts -dcmm-lint  -DDTRACE     -i -irts -irts/dist/build -irts/dist/build/autogen -Irts/dist/build -Irts/dist/build/autogen           -O2    -c rts/Globals.c -o rts/dist/build/Globals.dyn_o
:info:build rts/posix/GetTime.c:44:5:
:info:build rts/posix/GetTime.c:44:5:
:info:build      error: use of undeclared identifier 'mach_timebase_info_data_t'
:info:build      error: use of undeclared identifier 'mach_timebase_info_data_t'
:info:build         mach_timebase_info_data_t info;
:info:build         mach_timebase_info_data_t info;
:info:build         ^
:info:build         ^
:info:build rts/posix/GetTime.c:45:12:
:info:build      warning: implicit declaration of function 'mach_timebase_info' is invalid in C99 [-Wimplicit-function-declaration]
:info:build rts/posix/GetTime.c:45:12:
:info:build         (void) mach_timebase_info(&info);
:info:build      warning: implicit declaration of function 'mach_timebase_info' is invalid in C99 [-Wimplicit-function-declaration]
:info:build                ^
:info:build         (void) mach_timebase_info(&info);
:info:build                ^
:info:build rts/posix/GetTime.c:45:12:
:info:build      warning: this function declaration is not a prototype [-Wstrict-prototypes]
:info:build rts/posix/GetTime.c:45:12:
:info:build      warning: this function declaration is not a prototype [-Wstrict-prototypes]
:info:build rts/posix/GetTime.c:45:32:
:info:build      error: use of undeclared identifier 'info'; did you mean 'sinf'?
:info:build rts/posix/GetTime.c:45:32:
:info:build         (void) mach_timebase_info(&info);
:info:build      error: use of undeclared identifier 'info'; did you mean 'sinf'?
:info:build                                    ^~~~
:info:build         (void) mach_timebase_info(&info);
:info:build                                    sinf
:info:build                                    ^~~~
:info:build                                    sinf
:info:build /usr/include/math.h:342:14:  note: 'sinf' declared here
:info:build extern float sinf(float);
:info:build              ^
:info:build /usr/include/math.h:342:14:  note: 'sinf' declared here
:info:build extern float sinf(float);
:info:build              ^
:info:build rts/posix/GetTime.c:46:44:
:info:build      error: use of undeclared identifier 'info'; did you mean 'int'?
:info:build         timer_scaling_factor_numer = (uint64_t)info.numer;
:info:build                                                ^~~~
:info:build                                                int
:info:build rts/posix/GetTime.c:46:44:
:info:build      error: use of undeclared identifier 'info'; did you mean 'int'?
:info:build         timer_scaling_factor_numer = (uint64_t)info.numer;
:info:build                                                ^~~~
:info:build                                                int
:info:build rts/posix/GetTime.c:46:44:  error: expected expression
:info:build rts/posix/GetTime.c:46:44:  error: expected expression
:info:build rts/posix/GetTime.c:47:44:
:info:build      error: use of undeclared identifier 'info'; did you mean 'int'?
:info:build         timer_scaling_factor_denom = (uint64_t)info.denom;
:info:build                                                ^~~~
:info:build                                                int
:info:build rts/posix/GetTime.c:47:44:
:info:build      error: use of undeclared identifier 'info'; did you mean 'int'?
:info:build         timer_scaling_factor_denom = (uint64_t)info.denom;
:info:build rts/posix/GetTime.c:47:44:  error: expected expression
:info:build                                                ^~~~
:info:build                                                int
:info:build 2 warnings and 6 errors generated.
:info:build rts/posix/GetTime.c:47:44:  error: expected expression
:info:build 2 warnings and 6 errors generated.
:info:build make[1]: *** [rts/dist/build/posix/GetTime.o] Error 1
:info:build make[1]: *** Waiting for unfinished jobs....
:info:build make[1]: *** [rts/dist/build/posix/GetTime.p_o] Error 1
:info:build make: *** [all] Error 2
:info:build make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_ghc/ghc/work/ghc-7.8.3'
...

Attachments (1)

main.log (2.7 MB) - added by vovinacci (Volodymyr 'vovin' Shcherbinin) 7 years ago.

Change History (10)

Changed 7 years ago by vovinacci (Volodymyr 'vovin' Shcherbinin)

Attachment: main.log added

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

Cc: neverpanic removed
Keywords: highsierra added
Owner: set to neverpanic
Status: newassigned

comment:2 Changed 7 years ago by kencu (Ken)

Pretty sure this is 64 bit Intel only at this point in history. Why do you need it universal?

Edit: actually, I'm not so sure about this statement now. I seem to have been able to build it universal at times (K).

Last edited 7 years ago by kencu (Ken) (previous) (diff)

comment:3 Changed 7 years ago by vovinacci (Volodymyr 'vovin' Shcherbinin)

It's a stupid copy-paste from me in fact. It's doesn't have universal variant added

port installed ghc
The following ports are currently installed:
  ghc @7.8.3_5 (active)

Unfortunately I cannot edit ticket. If anyone could remove '+universal' from header and ticket description, that would be great.

comment:4 Changed 7 years ago by raimue (Rainer Müller)

Description: modified (diff)
Summary: ghc@7.8.3_5+universal: Failed to build on macOS 10.13ghc @7.8.3_5: Failed to build on macOS 10.13

comment:5 Changed 7 years ago by raimue (Rainer Müller)

See also #52551, which seems related.

comment:6 Changed 7 years ago by kencu (Ken)

this patch <https://github.com/macports/macports-ports/commit/d7385a7810b647a44b555a5ab660bf29fda225f4> probably needs to be broadened to later systems.

Last edited 7 years ago by kencu (Ken) (previous) (diff)

comment:7 Changed 7 years ago by kencu (Ken)

I have put up a pull request that implements a fix that should fix this issue. I don't presently have a system set up running 10.13, however. Please git it a try, and if it works, it can be committed.

comment:8 Changed 7 years ago by kencu (Ken)

Resolution: fixed
Status: assignedclosed

In 5aa3e10093d9587c26f30df75299c1a8791c4a80/macports-ports:

ghc: broaden sierra patch to later systems

closes: #54878

comment:9 Changed 7 years ago by vovinacci (Volodymyr 'vovin' Shcherbinin)

I can confirm that it works on 10.13.

% port dir ghc
/opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/lang/ghc
% cd /opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/lang/ghc
% ls
Portfile files
% sudo port clean ghc
--->  Cleaning ghc
% sudo vim Portfile <- apply patch
% sudo port upgrade ghc
--->  Fetching archive for ghc
--->  Attempting to fetch ghc-7.8.3_5.darwin_17.x86_64.tbz2 from https://packages.macports.org/ghc
--->  Attempting to fetch ghc-7.8.3_5.darwin_17.x86_64.tbz2 from http://nue.de.packages.macports.org/ghc
--->  Attempting to fetch ghc-7.8.3_5.darwin_17.x86_64.tbz2 from http://lil.fr.packages.macports.org/ghc
--->  Computing dependencies for ghc
--->  Fetching distfiles for ghc
--->  Verifying checksums for ghc
--->  Extracting ghc
--->  Applying patches to ghc
--->  Configuring ghc
--->  Building ghc
--->  Staging ghc into destroot
--->  Unable to uninstall ghc @7.8.3_5, the following ports depend on it:
--->  	hs-stm @2.4.2_3
[... skip ...]
--->  	shellcheck @0.3.8_0
Warning: Uninstall forced.  Proceeding despite dependencies.
--->  Deactivating ghc @7.8.3_5
--->  Cleaning ghc
--->  Uninstalling ghc @7.8.3_5
--->  Cleaning ghc
--->  Computing dependencies for ghc
--->  Installing ghc @7.8.3_5
--->  Activating ghc @7.8.3_5
--->  Cleaning ghc
--->  Updating database of binaries
--->  Scanning binaries for linking errors
--->  No broken files found.
Note: See TracTickets for help on using tickets.