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

Write a real autoconf script to verify build dependencies #1

Open
sanderjo opened this issue Sep 24, 2018 · 2 comments
Open

Write a real autoconf script to verify build dependencies #1

sanderjo opened this issue Sep 24, 2018 · 2 comments
Assignees

Comments

@sanderjo
Copy link

I tried "make" on my VPS (which is 32-bit), and got all kinds of errors.

sander@haring:~/git/halfempty$ make
Checking for glib-2.0...ok
gcc -Wall -std=gnu99 -O0 -ggdb3 -fPIC -Wno-format-zero-length -Wno-unused-parameter -UNDEBUG -UG_DISABLE_ASSERT `getconf LFS_CFLAGS` `pkg-config --cflags glib-2.0` -D_GNU_SOURCE  -c -o halfempty.o halfempty.c
halfempty.c:52:27: error: ‘G_OPTION_FLAG_NONE’ undeclared here (not in a function)
     { "num-threads", 'P', G_OPTION_FLAG_NONE, G_OPTION_ARG_INT, &kProcessThreads, "How many threads to use (default=ncores+1).", "threads" },
                           ^
halfempty.c:60:5: error: initializer element is not constant
     { "generate-dot", 0, G_OPTION_FLAG_NONE, G_OPTION_ARG_NONE, &kGenerateDotFile, "Generate a DOT file to display the tree status (default=off).", NULL },
     ^

"make" went OK on 64-bit Intel and 64-bit ARM.

So I guess halfempty is 32-bit only?
If so: I created 3 lines of code in Makefile to check for that. Do you want a PR for that?

~/git/halfempty$ make
Checking for 64-bit...ok
Checking for glib-2.0...ok
gcc -Wall -std=gnu99 -O0 -ggdb3 -fPIC -Wno-format-zero-length -Wno-unused-parameter -UNDEBUG -UG_DISABLE_ASSERT `getconf LFS_CFLAGS` `pkg-config --cflags glib-2.0` -D_GNU_SOURCE  -c -o halfempty.o halfempty.c

and

sander@haring:~/git/halfempty$ make
Checking for 64-bit...Not 64-bit
make: *** [check] Error 1

@taviso
Copy link
Collaborator

taviso commented Sep 24, 2018

Hmmm, I think you must have a version of glib older than 2.42, which is when they added that flag:

https://developer.gnome.org/glib/stable/glib-Commandline-option-parser.html#GOptionFlags

I should write a real configure script though, I'll keep this open to remind me.

@taviso taviso changed the title 64-bit only => check for it in Makefile Write a real autoconf script to verify build dependencies Sep 24, 2018
@taviso taviso self-assigned this Sep 24, 2018
@sanderjo
Copy link
Author

Hmmm, I think you must have a version of glib older than 2.42, which is when they added that flag:

Ah, yes, that makes more sense: Ubuntu 14.04, with glib 2.19.

Thanks.

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

No branches or pull requests

2 participants