Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: Consistently generate build tags on Make 4.3+ #2018

Merged
merged 4 commits into from
Feb 20, 2023

Conversation

sigv
Copy link
Contributor

@sigv sigv commented Jan 14, 2023

With Make 4.3+, the empty whitespace does not seem to work as originally intended. This causes build tags to be "netgo ledger," on Ubuntu 22.04 and other systems that include the newer Make version. The build tags were intended as "netgo,ledger" which can be observed on Make 4.2 (shipped with Ubuntu 20.04).

This change swaps out the += use in favor of an explicit :=.
Ref: Appending More Text to Variables

Closes #2017.

With Make 4.3+, the empty whitespace does not seem to work as
originally intended. This causes build tags to be "netgo ledger,"
on Ubuntu 22.04 and other systems that include the newer Make
version. The build tags were intended as "netgo,ledger" which
can be observed on Make 4.2 (shipped with Ubuntu 20.04).

This change swaps out the `+=` use in favor of an explicit `:=`.
Ref: https://www.gnu.org/software/make/manual/html_node/Appending.html

Closes cosmos#2017.
@sigv
Copy link
Contributor Author

sigv commented Jan 14, 2023

Minimal scenario provided in the linked issue, to highlight the behavior change.

@sigv sigv changed the title Consistently generate build tags on newer Make fix: Consistently generate build tags on Make 4.3+ Jan 14, 2023
@sigv
Copy link
Contributor Author

sigv commented Jan 14, 2023

Not sure if this will be considered for back-porting to current RC release/v8.0.x before final v8.0.0, but might be good for cleaning up behavior there.

FWIW, the "netgo ledger," behavior can be observed with pre-built Gaia 7.1.0:

$ ./gaiad-v7.1.0-linux-amd64 version --long 2>&1 | head -n5
name: gaia
server_name: gaiad
version: v7.1.0
commit: 5db8fcc9a229730f5115bed82d0f85b6db7184b4
build_tags: netgo ledger,

@mpoke mpoke changed the title fix: Consistently generate build tags on Make 4.3+ build: Consistently generate build tags on Make 4.3+ Jan 20, 2023
@yaruwangway yaruwangway mentioned this pull request Jan 20, 2023
@sonarcloud
Copy link

sonarcloud bot commented Jan 27, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@yaruwangway
Copy link
Contributor

@mmulji-ic , shall backport v7? v7 also has this build tag issue

@yaruwangway yaruwangway merged commit 297cdb9 into cosmos:main Feb 20, 2023
mergify bot pushed a commit that referenced this pull request Feb 20, 2023
With Make 4.3+, the empty whitespace does not seem to work as
originally intended. This causes build tags to be "netgo ledger,"
on Ubuntu 22.04 and other systems that include the newer Make
version. The build tags were intended as "netgo,ledger" which
can be observed on Make 4.2 (shipped with Ubuntu 20.04).

This change swaps out the `+=` use in favor of an explicit `:=`.
Ref: https://www.gnu.org/software/make/manual/html_node/Appending.html

Closes #2017.

Co-authored-by: Marius Poke <marius.poke@posteo.de>
Co-authored-by: Milan Mulji <98309852+mmulji-ic@users.noreply.github.com>
(cherry picked from commit 297cdb9)
mergify bot pushed a commit that referenced this pull request Feb 20, 2023
With Make 4.3+, the empty whitespace does not seem to work as
originally intended. This causes build tags to be "netgo ledger,"
on Ubuntu 22.04 and other systems that include the newer Make
version. The build tags were intended as "netgo,ledger" which
can be observed on Make 4.2 (shipped with Ubuntu 20.04).

This change swaps out the `+=` use in favor of an explicit `:=`.
Ref: https://www.gnu.org/software/make/manual/html_node/Appending.html

Closes #2017.

Co-authored-by: Marius Poke <marius.poke@posteo.de>
Co-authored-by: Milan Mulji <98309852+mmulji-ic@users.noreply.github.com>
(cherry picked from commit 297cdb9)
mergify bot pushed a commit that referenced this pull request Feb 20, 2023
With Make 4.3+, the empty whitespace does not seem to work as
originally intended. This causes build tags to be "netgo ledger,"
on Ubuntu 22.04 and other systems that include the newer Make
version. The build tags were intended as "netgo,ledger" which
can be observed on Make 4.2 (shipped with Ubuntu 20.04).

This change swaps out the `+=` use in favor of an explicit `:=`.
Ref: https://www.gnu.org/software/make/manual/html_node/Appending.html

Closes #2017.

Co-authored-by: Marius Poke <marius.poke@posteo.de>
Co-authored-by: Milan Mulji <98309852+mmulji-ic@users.noreply.github.com>
(cherry picked from commit 297cdb9)
@sigv sigv deleted the build_tags-make_4.3 branch February 20, 2023 10:33
mmulji-ic pushed a commit that referenced this pull request Feb 20, 2023
With Make 4.3+, the empty whitespace does not seem to work as
originally intended. This causes build tags to be "netgo ledger,"
on Ubuntu 22.04 and other systems that include the newer Make
version. The build tags were intended as "netgo,ledger" which
can be observed on Make 4.2 (shipped with Ubuntu 20.04).

This change swaps out the `+=` use in favor of an explicit `:=`.
Ref: https://www.gnu.org/software/make/manual/html_node/Appending.html

Closes #2017.

Co-authored-by: Marius Poke <marius.poke@posteo.de>
Co-authored-by: Milan Mulji <98309852+mmulji-ic@users.noreply.github.com>
(cherry picked from commit 297cdb9)

Co-authored-by: Valters Jansons <sigv@users.noreply.github.com>
mmulji-ic pushed a commit that referenced this pull request Feb 20, 2023
With Make 4.3+, the empty whitespace does not seem to work as
originally intended. This causes build tags to be "netgo ledger,"
on Ubuntu 22.04 and other systems that include the newer Make
version. The build tags were intended as "netgo,ledger" which
can be observed on Make 4.2 (shipped with Ubuntu 20.04).

This change swaps out the `+=` use in favor of an explicit `:=`.
Ref: https://www.gnu.org/software/make/manual/html_node/Appending.html

Closes #2017.

Co-authored-by: Marius Poke <marius.poke@posteo.de>
Co-authored-by: Milan Mulji <98309852+mmulji-ic@users.noreply.github.com>
(cherry picked from commit 297cdb9)

Co-authored-by: Valters Jansons <sigv@users.noreply.github.com>
yaruwangway added a commit that referenced this pull request Mar 1, 2023
* Update changelog for v9 rc7 (#2219)

* Update v8.0.1 changelog (#2221)

* Consistently generate build tags on newer Make (#2018)

With Make 4.3+, the empty whitespace does not seem to work as
originally intended. This causes build tags to be "netgo ledger,"
on Ubuntu 22.04 and other systems that include the newer Make
version. The build tags were intended as "netgo,ledger" which
can be observed on Make 4.2 (shipped with Ubuntu 20.04).

This change swaps out the `+=` use in favor of an explicit `:=`.
Ref: https://www.gnu.org/software/make/manual/html_node/Appending.html

Closes #2017.

Co-authored-by: Marius Poke <marius.poke@posteo.de>
Co-authored-by: Milan Mulji <98309852+mmulji-ic@users.noreply.github.com>

* - Update doc to follow Go conventions
- Improve code readability

* update params

* docs: update docs

* fix: lint

---------

Co-authored-by: lg <8335464+glnro@users.noreply.github.com>
Co-authored-by: Valters Jansons <sigv@users.noreply.github.com>
Co-authored-by: Marius Poke <marius.poke@posteo.de>
Co-authored-by: Milan Mulji <98309852+mmulji-ic@users.noreply.github.com>
Co-authored-by: Simon Noetzlin <simon.ntz@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Build tags assigned incorrectly ("netgo ledger,") with Make 4.3+
5 participants