WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

-X flag requires argument of the form importpath.name=value #270

@Dmitry052

Description

@Dmitry052

I want to build an application for x64 with environment variables but I get an error
/go/pkg/mod/golang.org/[email protected]/pkg/tool/linux_arm64/link: -X flag requires argument of the form importpath.name=value

To Reproduce:

Steps to reproduce the behaviour:

  1. GOFLAGS="-ldflags=-X -ldflags=main.APP_URL=https://best.app" fyne-cross windows -arch=amd64 --app-id my.app
  2. When run
    GOFLAGS="-ldflags=-X=main.APP_URL=https://best.app" fyne-cross windows -arch=amd64 --app-id my.app
    or
    GOFLAGS="-ldflags=-X-ldflags=main.APP_URL=https://best.app" fyne-cross windows -arch=amd64 --app-id my.app
    the application builds but the variables are not linked in main.go
  3. when i build the app for mac/windows on arm such a problem does not arise, envs are linked
Device info
  • OS: MacOS
  • Version: Version 14.6.1 (23G93)
  • Go version: go version go1.23.2 darwin/arm64
  • fyne-cross version: fyne-cross version v1.5.0
  • Fyne version: fyne cli version: v2.5.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions