Giter VIP home page Giter VIP logo

Comments (8)

danilobuerger avatar danilobuerger commented on August 19, 2024

Building 0.8.0 just gives a warning regarding _FORTIFY_SOURCE:

-- The C compiler identification is GNU 4.9.2
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
-- Configuring done
-- Generating done
-- Build files have been written to: /build/src/tini-0.8.0
Scanning dependencies of target tini-staticScanning dependencies of target tini

[ 50%] [100%] Building C object CMakeFiles/tini.dir/src/tini.c.oBuilding C object CMakeFiles/tini-static.dir/src/tini.c.o

<command-line>:0:0: warning: "_FORTIFY_SOURCE" redefined
<built-in>: note: this is the location of the previous definition
<command-line>:0:0: warning: "_FORTIFY_SOURCE" redefined
<built-in>: note: this is the location of the previous definition
Linking C executable tiniLinking C executable tini-static

[100%] Built target tini

from tini.

krallin avatar krallin commented on August 19, 2024

This is probably because I made warnings fatal in cd23c4c

It looks like -D_FORTIFY_SOURCE=2 isn't needed on alpine because it's default: http://git.alpinelinux.org/cgit/aports/plain/main/gcc/010_all_default-fortify-source.patch.

Not sure how best to address this. Thoughts? You could drop add_definitions (-D_FORTIFY_SOURCE=2) in CMakeLists.txt in a patch (which would be consistent with what Alpine does for GCC), but that's more work for you.


Otherwise, I could make this warning non-fatal.

from tini.

danilobuerger avatar danilobuerger commented on August 19, 2024

I dont know much about it, but judging the comment i would assume that building would now fail on every distro that has fortify source enabled by default? If that is the case, i think a solution would be better suited here to not get frustrated user from distro XY posting issues about it here.

from tini.

krallin avatar krallin commented on August 19, 2024

Fair enough. I'll add a test for it being a builtin instead.

from tini.

krallin avatar krallin commented on August 19, 2024

@danilobuerger can you try this branch: https://github.com/krallin/tini/tree/fix-22?

(I tested it with the official Alpine Docker image and it seems to work, but I'd appreciate it if you could confirm it :) )

from tini.

danilobuerger avatar danilobuerger commented on August 19, 2024

Confirmed ๐Ÿ’ƒ

from tini.

krallin avatar krallin commented on August 19, 2024

Awesome; thanks!

I'm going to try and add a check for hardening being enabled in the CI script before I merge this (to make sure we still enable fortify source outside of Alpine!)

from tini.

krallin avatar krallin commented on August 19, 2024

I added the tests in a separate branch (blocked on travis-ci/apt-package-safelist#1654 though), but I merged the fix now in #23 (version 0.8.3).

Thanks for the report!

from tini.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.