Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 674918 - =app-crypt/argon2-20171227 ignores CC
Summary: =app-crypt/argon2-20171227 ignores CC
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Simon Levermann (sonOfRa)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: cflags 666641
  Show dependency tree
 
Reported: 2019-01-08 21:21 UTC by Jeroen Roovers (RETIRED)
Modified: 2019-03-16 04:55 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jeroen Roovers (RETIRED) gentoo-dev 2019-01-08 21:21:48 UTC
>>> Compiling source in /var/tmp/portage/app-crypt/argon2-20171227/work/phc-winner-argon2-20171227 ...
make -j3
/bin/sh: line 1:  1428 Aborted                 cc -Iinclude -Isrc -mschedule=8000 -march=2.0 -ggdb -Wall -O2 -pipe -Wno-comment src/opt.c -c -o /dev/null 2> /dev/null
Building without optimizations
cc -mschedule=8000 -march=2.0 -ggdb -Wall -O2 -pipe -Wno-comment -std=c89 -Wall -Iinclude -Isrc -pthread -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -Wl,--no-keep-memory src/argon2.c src/core.c src/blake2/blake2b.c src/thread.c src/encoding.c src/ref.c src/run.c -o argon2
cc -mschedule=8000 -march=2.0 -ggdb -Wall -O2 -pipe -Wno-comment -std=c89 -Wall -Iinclude -Isrc -pthread -shared -fPIC -fvisibility=hidden -DA2_VISCTL=1 -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -Wl,--no-keep-memory -Wl,-soname,libargon2.so.1 src/argon2.c src/core.c src/blake2/blake2b.c src/thread.c src/encoding.c src/ref.c -o libargon2.so.1
malloc(): corrupted top size
make: *** [Makefile:130: argon2] Aborted
make: *** Waiting for unfinished jobs....
malloc(): corrupted top size
make: *** [Makefile:139: libargon2.so.1] Aborted
Comment 1 Simon Levermann (sonOfRa) 2019-01-09 09:23:24 UTC
I currently don't have a gentoo system at hand to test this in, but a quick check on the command line seems to suggest that the Makefile does not ignore CC:

CC=foobar make
Building without optimizations
foobar -std=c89 -O3 -Wall -g -Iinclude -Isrc -pthread  src/argon2.c src/core.c src/blake2/blake2b.c src/thread.c src/encoding.c src/ref.c src/run.c -o argon2
make: foobar: Command not found
make: *** [Makefile:130: argon2] Error 127


as well as

export CC=foobar
make
Building without optimizations
foobar -std=c89 -O3 -Wall -g -Iinclude -Isrc -pthread  src/argon2.c src/core.c src/blake2/blake2b.c src/thread.c src/encoding.c src/ref.c src/run.c -o argon2
make: foobar: Command not found
make: *** [Makefile:130: argon2] Error 127


The ebuild doesn't seem to overwrite it either. Any ideas?
Comment 2 Simon Levermann (sonOfRa) 2019-01-09 10:31:24 UTC
And here's a build log created with

CC=foobar emerge -1 =app-crypt/argon2-20171227

[32;01m * [39;49;00mPackage:    app-crypt/argon2-20171227
[32;01m * [39;49;00mRepository: gentoo
[32;01m * [39;49;00mMaintainer: simon-bgo@slevermann.de proxy-maint@gentoo.org
[32;01m * [39;49;00mUSE:        abi_x86_64 amd64 elibc_glibc kernel_linux userland_GNU
[32;01m * [39;49;00mFEATURES:   network-sandbox preserve-libs sandbox userpriv usersandbox
>>> Unpacking source...
>>> Unpacking argon2-20171227.tar.gz to /var/tmp/portage/app-crypt/argon2-20171227/work
>>> Source unpacked in /var/tmp/portage/app-crypt/argon2-20171227/work
>>> Preparing source in /var/tmp/portage/app-crypt/argon2-20171227/work/phc-winner-argon2-20171227 ...
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/app-crypt/argon2-20171227/work/phc-winner-argon2-20171227 ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/app-crypt/argon2-20171227/work/phc-winner-argon2-20171227 ...
make -j3 -l3.5 
Building without optimizations
foobar -march=native -O2 -pipe -std=c89 -Wall -Iinclude -Isrc -pthread -Wl,-O1 -Wl,--as-needed src/argon2.c src/core.c src/blake2/blake2b.c src/thread.c src/encoding.c src/ref.c src/run.c -o argon2
make: foobar: Command not found
make: *** [Makefile:130: argon2] Error 127
 [31;01m*[0m ERROR: app-crypt/argon2-20171227::gentoo failed (compile phase):
 [31;01m*[0m   emake failed
 [31;01m*[0m 
 [31;01m*[0m If you need support, post the output of `emerge --info '=app-crypt/argon2-20171227::gentoo'`,
 [31;01m*[0m the complete build log and the output of `emerge -pqv '=app-crypt/argon2-20171227::gentoo'`.
 [31;01m*[0m The complete build log is located at '/var/tmp/portage/app-crypt/argon2-20171227/temp/build.log'.
 [31;01m*[0m The ebuild environment file is located at '/var/tmp/portage/app-crypt/argon2-20171227/temp/environment'.
 [31;01m*[0m Working directory: '/var/tmp/portage/app-crypt/argon2-20171227/work/phc-winner-argon2-20171227'
 [31;01m*[0m S: '/var/tmp/portage/app-crypt/argon2-20171227/work/phc-winner-argon2-20171227'

CC seems to be honored here
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2019-01-09 12:01:57 UTC
So you're saying that when not using an ebuild and by specifying CC=... on the make command line, everything is alright? Because it is not alright when using the ebuilds that are currently in the tree.

The ebuilds should `inherit toolchain-funcs` and then `tc-export CC`.
Comment 4 Simon Levermann (sonOfRa) 2019-01-09 12:06:04 UTC
My first comment was just a quick try on the command-line yes.

But the second comment is a build log from attempting to build argon2 in a gentoo setting with

CC=foobar emerge -1 =app-crypt/argon2-20171227

In that case, CC *is* honored.

Is this fundamentally different from how it is set in make.conf? I have no experience with non-amd64/x86 arches or cross-building, so I'm a bit stumped here.
Comment 5 Jeroen Roovers (RETIRED) gentoo-dev 2019-01-09 15:42:44 UTC
(In reply to Simon Levermann from comment #4)
> My first comment was just a quick try on the command-line yes.
> 
> But the second comment is a build log from attempting to build argon2 in a
> gentoo setting with
> 
> CC=foobar emerge -1 =app-crypt/argon2-20171227
> 
> In that case, CC *is* honored.

Apparently that bleeds over into the build system.

> Is this fundamentally different from how it is set in make.conf? I have no
> experience with non-amd64/x86 arches or cross-building, so I'm a bit stumped
> here.

It's nothing to do with non-x86 or with cross-compiling. If it's set *nowhere* then it defaults to CC=cc, and setting it directly in make.conf is not common either. So the advice from comment #3 stands.

If you like I can patch it up for you.
Comment 6 Larry the Git Cow gentoo-dev 2019-03-16 04:55:49 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=60c0897b68f5e4a80e733a7ef0716b4bba421762

commit 60c0897b68f5e4a80e733a7ef0716b4bba421762
Author:     Michael Palimaka <kensington@gentoo.org>
AuthorDate: 2019-03-16 04:51:26 +0000
Commit:     Michael Palimaka <kensington@gentoo.org>
CommitDate: 2019-03-16 04:55:31 +0000

    app-crypt/argon2: revision bump
    
    * Port to EAPI 7
    * Install documentation
    * Respect CC
    * Install pkg-config file
    
    Closes: https://bugs.gentoo.org/674918
    Package-Manager: Portage-2.3.62, Repoman-2.3.12
    Signed-off-by: Michael Palimaka <kensington@gentoo.org>

 app-crypt/argon2/argon2-20171227-r1.ebuild | 40 ++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)