Opened 2 years ago

Last modified 12 months ago

#64118 assigned enhancement

go: notes: only display environment variables needed, if not already set by user

Reported by: macdeport Owned by: ci42
Priority: Normal Milestone:
Component: ports Version: 2.7.1
Keywords: Cc: macdeport, herbygillot (Herby Gillot), mascguy (Christopher Nielsen)
Port: go

Description

--->  Some of the ports you installed have notes:
  go has the following notes:
    go had to be specially patched and built to work on your platform.
    
    It likely won't work out of the box when building other projects, so make sure change your environment to use the following variables:
      * GO_EXTLINK_ENABLED="1"
    to always force go to use the external gcc or clang linker and
      * GO_LDFLAGS="\"-extldflags=${configure.ldflags}\""
      * CGO_LDFLAGS="-g -O2 ${configure.ldflags}"
    to force-link any binary against the legacy support library. Use exactly the quoting provided here, even if it may look odd, or compilation will fail.
    
    Failure to do so will leave you unable to create binaries that use features not natively available on your system, either directly or through a go core
    dependency.

Change History (6)

comment:1 Changed 2 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: herbygillot added
Owner: set to ci42
Status: newassigned

comment:2 Changed 2 years ago by macdeport

I propose to display this message only if these environment variables are not actually set correctly.

comment:3 Changed 2 years ago by mascguy (Christopher Nielsen)

Cc: mascguy added

comment:4 Changed 2 years ago by herbygillot (Herby Gillot)

So we should only display this where it is *absolutely* necessary, where (it seems) we are using Go with legacysupport.

Secondly, it may make more sense to install a wrapper script that wraps Go rather than asking the user to set all of these environment variables themselves.

comment:5 in reply to:  4 Changed 2 years ago by mascguy (Christopher Nielsen)

Replying to herbygillot:

Secondly, it may make more sense to install a wrapper script that wraps Go rather than asking the user to set all of these environment variables themselves.

If these environment variables have to be set for things to work properly, then I agree: We should provide a wrapper script which takes care of it.

comment:6 Changed 12 months ago by mascguy (Christopher Nielsen)

Summary: go @1.17.4: enhancement propositiongo: notes: only display environment variables needed, if not already set by user
Note: See TracTickets for help on using tickets.