Skip to content
This repository was archived by the owner on Dec 15, 2021. It is now read-only.
This repository was archived by the owner on Dec 15, 2021. It is now read-only.

Inconsistent build behaviour in Makefile - statically and dynamically linked built binary  #974

@stefancocora

Description

@stefancocora

Is this a BUG REPORT or FEATURE REQUEST?:

BUG REPORT

What happened:
While building upstream archlinux packages for kubeless I've come across what looks to me like inconsistent build behavior/workflow.
See the dependencies list between:
https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=kubeless-bin#n13
and
https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=kubeless-git#n12

I've followed these steps to create a build from the latest git tag https://github.com/kubeless/kubeless/blob/master/.circleci/config.yml#L77-L105
Is it expected behaviour that the binary-cross make rule that is used during github releases creates a statically linked pkg while the make binary/all are forced to be dynamically linked ?

What you expected to happen:
I expected that a build from the latest git would behave in the same manner as a github release build and yield a statically linked binary.

How to reproduce it (as minimally and precisely as possible):
Git clone the latest master and run make binary , you'll get:

  ldd ./kubeless
	  linux-vdso.so.1 (0x00007ffdf75e2000)
	  libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007f76665f1000)
	  libc.so.6 => /usr/lib/libc.so.6 (0x00007f766642d000)
	  /lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007f766664b000)

A github released binary is statically linked by default.

  ldd $(which kubeless)
          not a dynamic executable

Anything else we need to know?:

Environment:

  • Kubernetes version (use kubectl version): N/A
  • Kubeless version (use kubeless version): Kubeless version: v1.0.0-3-g026071aa
  • Cloud provider or physical cluster: N/A

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