You are not logged in.
Hi all,
I'm trying to build fatback, for blackarch mainly but I'll upload to AUR too, and I'm having some weird outcomes.
If I run makepkg -sfic on this, it fails with a load of compiler errors, but if I run the configure & make separately, it works fine, only complaining about flex library missing. See here
What gives?
Makepkg log
Command output 1
Command output 2
Command output 3
EDIT: Solution was a mix of environment variables for me, and the original dev making some mistakes, see last post.
Last edited by elken (2014-05-26 14:52:04)
Useless shit wot I do | "A very witty and relatable quote." -- A wise man
Offline
From the title, I was going to suggest the differences would be in environment variables inherited from makepkg.conf - but after reading this the difference is much more clear: when you do it manually, you edit the makefile!
Patch the makefile with your change in the PKGBUILD.
If you don't manually edit the makefile to add the linker flag, do you get the same errors when building manually as you do with makepkg? If so, that confirms that this is the only issue.
Last edited by Trilby (2014-05-26 13:28:00)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
No I should have been clearer, my apologies.
When I run makepkg, I get the errors specified, but if I run them myself, the only error I get is about flex library missing. I've edited OP and included an image. I thought it might have been env vars, here is my makepkg.conf, I can't see anything glaring. -D_FORTIFY_SOURCE maybe?
Last edited by elken (2014-05-26 13:36:05)
Useless shit wot I do | "A very witty and relatable quote." -- A wise man
Offline
OK, then this is likely due to the flags specified in makepkg.conf.
You can test this by specifying the same flags:
source /etc/makepkg.conf
make CFLAGS=$CFLAGS LDFLAGS=$LDFLAGS CXXFLAGS=$CXXFLAGSEDIT: also, you may want to see this recurring theme in the grr thread. Heeding the implied advice will make it much easier for other users here to see the output you're getting - and thus much more likely that they'll take the time to read it.
Last edited by Trilby (2014-05-26 13:37:52)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Output. How queer.
EDIT: My apologies, I'm not used to pasting with sprunge yet, I forget about 2&>1. Output
Last edited by elken (2014-05-26 13:42:35)
Useless shit wot I do | "A very witty and relatable quote." -- A wise man
Offline
Thanks for the text version.
I think we missed some makepkg flags. I just tried this PKGBUILD - I get the same error you do with makepkg. When I build manually I also get the flex errors that you just posted *unless* I export the makepkg variables - then I get the same error as with makepkg. But above I missed "CPPFLAGS" - so try the following in the (clean) source directory:
source /etc/makepkg.conf
export CFLAGS
export LDFLAGS
export CPPFLAGS
export CXXFLAGS
./configure
makeThis produces the same error as the makepkg for me.
EDIT: and I found the problem. The upstream source was trying to pass definitions of data types through compiler "DEF" flags (eg -Dsize_t=unsigned) This conflicted with the internal typdefs for these types included from header files. Removing these absurd definitions allows it to compile. Stand by for a patch/sed command for the PKGBUILD.
EDIT: Insert this in the PKGBUILD after the configure command and before make in the build function:
sed -i 's/-Doff_t=long -Dpid_t=int -Dsize_t=unsigned//' MakefileFor explanation: the DEF flag defined "size_t" as "unsigned" so anytime the former was encountered in the code, it was replaced with the latter. But in the code, included header files had lines like "typedef size_t unsigned;" which the preprocessor then turned into "typdedef unsigned unsigned;" which doesn't make any sense to the compiler.
Last edited by Trilby (2014-05-26 14:42:41)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Ah, that makes sense. I was trying to individually patch the definitions. I didn't think it made much sense. Much appreciated, thanks!
Useless shit wot I do | "A very witty and relatable quote." -- A wise man
Offline
Oh, are you the upstream source of those defs ... sorry about the "absurd" comment then, but - they kinda are ![]()
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
No no, it's not me, I was trying to rewrite them now ![]()
Useless shit wot I do | "A very witty and relatable quote." -- A wise man
Offline