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

[Bug]: kickstart.sh on FreeBSD is all sorts of wrong #13230

Closed
MikeJakubik opened this issue Jun 27, 2022 · 8 comments
Closed

[Bug]: kickstart.sh on FreeBSD is all sorts of wrong #13230

MikeJakubik opened this issue Jun 27, 2022 · 8 comments
Assignees
Labels
area/packaging Packaging and operating systems support bug os/bsd bsd os related issues priority/medium

Comments

@MikeJakubik
Copy link

MikeJakubik commented Jun 27, 2022

Bug description

The kickstart script works on FreeBSD for brand new installations, however, it has a number of issues.

  1. Installation directory is not complaint with FreeBSD hier, it installs to /usr/local/usr. The use of the last usr directory is unnecessary.
  2. Subsequent runs of kickstart fail due to " Found an existing netdata install at /usr/local/usr, but could not determine the install type.:"
  3. Installation of GCC is not required, FreeBSD comes with Clang/LLVM which compiles everything just fine.

Expected behavior

  1. Install to /usr/local/ instead of /usr/local/usr
  2. Script should know it was the one that installed it
  3. Use native Clang/LLVM compiler

Steps to reproduce

  1. Run kickstart.sh and then re-run it to show both problems.

Installation method

kickstart.sh

System info

FreeBSD staging.swift-api.com 13.1-STABLE FreeBSD 13.1-STABLE #0 stable/13-be3f66738: Tue Jun 14 14:45:31 EDT 2022     root@staging.swift-api.com:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64
1301504

FreeBSD clang version 14.0.4 (https://github.com/llvm/llvm-project.git llvmorg-14.0.4-0-g29f1039a7285)
Target: x86_64-unknown-freebsd13.1
Thread model: posix
InstalledDir: /usr/bin

Netdata build info

Version: netdata v1.35.0-75-nightly
Configure options:  '--prefix=/usr/local/usr' '--sysconfdir=/usr/local/etc' '--localstatedir=/usr/local/var' '--libexecdir=/usr/local/usr/libexec' '--libdir=/usr/local/usr/lib' '--with-zlib' '--with-math' '--with-user=netdata' '--enable-cloud' '--disable-dependency-tracking' '--with-bundled-protobuf' '--with-bundled-libJudy' 'CFLAGS=-O2 -march=native' 'LDFLAGS=' 'CXXFLAGS=-O2 -march=native'
Install type: kickstart-build
Features:
    dbengine:                   YES
    Native HTTPS:               YES
    Netdata Cloud:              YES
    ACLK Next Generation:       YES
    ACLK-NG New Cloud Protocol: YES
    ACLK Legacy:                NO
    TLS Host Verification:      YES
    Machine Learning:           YES
    Stream Compression:         YES
Libraries:
    protobuf:                YES (bundled)
    jemalloc:                NO
    JSON-C:                  YES
    libcap:                  NO
    libcrypto:               YES
    libm:                    YES
    tcalloc:                 NO
    zlib:                    YES
Plugins:
    apps:                    YES
    cgroup Network Tracking: NO
    CUPS:                    NO
    EBPF:                    NO
    IPMI:                    NO
    NFACCT:                  NO
    perf:                    NO
    slabinfo:                NO
    Xen:                     NO
    Xen VBD Error Tracking:  NO
Exporters:
    AWS Kinesis:             NO
    GCP PubSub:              NO
    MongoDB:                 NO
    Prometheus Remote Write: NO

Additional info

No response

@MikeJakubik MikeJakubik added bug needs triage Issues which need to be manually labelled labels Jun 27, 2022
@ilyam8 ilyam8 added area/packaging Packaging and operating systems support os/bsd bsd os related issues and removed needs triage Issues which need to be manually labelled labels Jun 28, 2022
@Ferroin
Copy link
Member

Ferroin commented Jun 28, 2022

1 is a known bug in the build system itself (though we don’t yet have a dedicated issue for it.

2 is unexpected, but may be related to the first item. I’ll look into this to try and at least figure out what the root cause is.

3 is an issue of our own handling of installation, and needs some further work to resolve (and, TBH, we should work with Clang installed and GCC not installed no matter what the OS is).

@Ferroin
Copy link
Member

Ferroin commented Jun 28, 2022

Correction, we actually do have an issue open for item 1 already, see the discussion near the end of #12430 (the initial issue was a misunderstanding, but uncovered this particular problem as well).


Correction, new issue opened for that specific build system problem here: #13242

@MikeJakubik
Copy link
Author

3 is an issue of our own handling of installation, and needs some further work to resolve (and, TBH, we should work with Clang installed and GCC not installed no matter what the OS is).

I'd imagine you probably want to use Clang on macOS as well since it is also a part of the base OS.

@Ferroin
Copy link
Member

Ferroin commented Jun 28, 2022

3 is an issue of our own handling of installation, and needs some further work to resolve (and, TBH, we should work with Clang installed and GCC not installed no matter what the OS is).

I'd imagine you probably want to use Clang on macOS as well since it is also a part of the base OS.

I think we may already do so there. Our dependency handling for builds is unfortunately rather messy right now, so I’m not certain.

I’m double checking internally though to confirm that we have no build issues with Clang, and if that’s the case this particular part will be much easier to fix than I originally expected.

@MikeJakubik
Copy link
Author

MikeJakubik commented Jun 28, 2022

I’m double checking internally though to confirm that we have no build issues with Clang, and if that’s the case this particular part will be much easier to fix than I originally expected.

That should be the case, it's been building on FreeBSD since Clang 11 and Netdata 1.5.0.

@Ferroin
Copy link
Member

Ferroin commented Jun 28, 2022

See: #13243 for item 2.

@Ferroin
Copy link
Member

Ferroin commented Jun 28, 2022

See: #13244 for item 3.

@Ferroin
Copy link
Member

Ferroin commented Oct 21, 2022

Closing this as the second and third issues are resolved, and the first has been split out into a more general issue regarding install prefix handling at #13242. I plan to get back to that particular problem in the near future, though there have been some improvements recently (such as the latest nightlies finally being fixed to install the init script in /usr/local/etc/rc.d instead of /etc/rc.d).

@Ferroin Ferroin closed this as completed Oct 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/packaging Packaging and operating systems support bug os/bsd bsd os related issues priority/medium
Projects
None yet
Development

No branches or pull requests

6 participants