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

Makefile: Support passing environment variables through make--and use… #710

Closed
wants to merge 1 commit into from

Conversation

daym
Copy link
Collaborator

@daym daym commented May 2, 2020

… it to support host compilers that use environment variables CPATH etc. See Issue #609.

@daym
Copy link
Collaborator Author

daym commented May 2, 2020

TODO: Test via:

cd heads
make BOARD=YourBoard real.clean
rm -rf crossgcc
make BOARD=YourBoard

on fedora-30.

@daym
Copy link
Collaborator Author

daym commented May 2, 2020

With make BOARD=qemu-linuxboot on Guix I get:

gawk: fatal: cannot use gawk builtin `namespace' as variable

in libgpg-error 1.32 that you download.

Gawk used is v5.0.1.

See also https://stackoverflow.com/questions/55664467/gawk-error-when-compiling-libgpg-error-in-crossdev-armv7a-environment

tlaurion added a commit to tlaurion/heads that referenced this pull request May 3, 2020
…gawk error fixed upstream). Goal of this is to show that x230 board will die if we do not resolve linuxboot#590, or move along with linuxboot#703.
tlaurion added a commit to tlaurion/heads that referenced this pull request May 4, 2020
@tlaurion
Copy link
Collaborator

tlaurion commented May 4, 2020

@daym please see #714

@tlaurion
Copy link
Collaborator

@daym : Fixes were merged upstream. Please retest!

@daym
Copy link
Collaborator Author

daym commented May 24, 2020

Rebased to your current master. Works fine for BOARD=qemu-linuxboot.

@tlaurion
Copy link
Collaborator

@daym Testing this locally

@tlaurion
Copy link
Collaborator

@daym #609 (comment)

… it to support host compilers that use environment variables CPATH etc
@tlaurion
Copy link
Collaborator

tlaurion commented May 29, 2020

@daym : You can see the results of failed builds at each additional commit by clicking the check details of each PR; then click details which will bring you to CircleCI build of your commit, where you can see errors of the current attempted build.

This is a long process, since each PR builds the whole cross-gcc-make toolchain and then the boards defined there. The 9021606 commit resulted in this failed build

Current log exerpt:

tail /root/project/build/log/libpng.log

-----

make -C "/root/project/build/libpng-1.6.34"  CC=/root/project/crossgcc/bin/x86_64-linux-musl-gcc -fdebug-prefix-map=/root/project=heads -gno-record-gcc-switches -D__MUSL__ -I/root/project/install/include -L/root/project/install/lib  CPP=/root/project/crossgcc/bin/x86_64-linux-musl-cpp CXXCPP=/root/project/crossgcc/bin/x86_64-linux-musl-cpp    AR=/root/project/crossgcc/bin/x86_64-linux-musl-ar LD=/root/project/crossgcc/bin/x86_64-linux-musl-ld STRIP=/root/project/crossgcc/bin/x86_64-linux-musl-strip NM=/root/project/crossgcc/bin/x86_64-linux-musl-nm OBJCOPY=/root/project/crossgcc/bin/x86_64-linux-musl-objcopy OBJDUMP=/root/project/crossgcc/bin/x86_64-linux-musl-objdump PKG_CONFIG_PATH=/root/project/install/lib/pkgconfig PKG_CONFIG_SYSROOT_DIR=/root/project/install   DESTDIR=/root/project/install install 

make[1]: Entering directory '/root/project/build/libpng-1.6.34'

rm -f pnglibconf.c pnglibconf.tf[45]

mawk -f ./scripts/options.awk out=pnglibconf.tf4 version=search\

    ./pngconf.h ./scripts/pnglibconf.dfa\

    ./pngusr.dfa  1>&2

mawk -f ./scripts/options.awk out=pnglibconf.tf5 pnglibconf.tf4 1>&2

rm pnglibconf.tf4

mv pnglibconf.tf5 pnglibconf.c

rm -f pnglibconf.out pnglibconf.tf[12]

test -d scripts || mkdir scripts || test -d scripts

/root/project/crossgcc/bin/x86_64-linux-musl-cpp -DHAVE_CONFIG_H -I. \

     -DPNGLIB_LIBNAME='PNG16_0' -DPNGLIB_VERSION='1.6.34' -DSYMBOL_PREFIX='' -DPNG_NO_USE_READ_MACROS -DPNG_BUILDING_SYMBOL_TABLE  pnglibconf.c > pnglibconf.tf1

pnglibconf.c:33:11: fatal error: zlib.h: No such file or directory

 # include <zlib.h>

           ^~~~~~~~

compilation terminated.

make[1]: *** [Makefile:2208: pnglibconf.out] Error 1

make[1]: Leaving directory '/root/project/build/libpng-1.6.34'

make: *** [Makefile:387: /root/project/build/libpng-1.6.34/.build] Error 1

@tlaurion
Copy link
Collaborator

tlaurion commented May 29, 2020

@daym Would love to chat with you. You seem to have expertise i'm looking for and we could collaborate in fixing the build system for everyone, including CIs.

Those were brought to my attention:

Maybe Heads is taking the wrong approach by depending on musl-cross-make.

Even more if looking to accomplish #590, which would depend on LTO in the goal of doing #571 and supporting smaller SPI chip devices like #453

Want to contact me from methods defined at insurgo.ca/#contact ?

@tlaurion
Copy link
Collaborator

@daym : the discussion could also happen under #609.

@tlaurion
Copy link
Collaborator

I think this is done, where nix is used now as #1661 is merged

@tlaurion tlaurion closed this May 10, 2024
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.

2 participants