Discussion:
[sword-devel] Problems with th xz related code
Stefan Husmann
2014-08-24 11:54:32 UTC
Permalink
Hello,

I have problems compiling sword in revision 3249 under Arch Linux 64 bit both using clang++ or g++.

Switching off xz (configure option --without-xz) solves the issue.

I attach the two compile logs, hope it is okay to do so.

Best Regards

Stefan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: compile_with_xz.zip
Type: application/zip
Size: 16061 bytes
Desc: not available
URL: <http://www.crosswire.org/pipermail/sword-devel/attachments/20140824/03ebb8d6/attachment.zip>
Troy A. Griffitts
2014-08-24 15:04:59 UTC
Permalink
Hi Stefan,

Could you run this program on your system and then tell me the output:
(the sword/examples/classes folder has an appropriate Makefile to build
against sword if you want to drop it in that folder and then type: make
<your filename>.cpp)

#include<sysdata.h>
#include<stdio.h>

int main(int argc, char **argv) {

printf("%ld\n", sizeof(__u64));
return 0;
}
Post by Stefan Husmann
Hello,
I have problems compiling sword in revision 3249 under Arch Linux 64 bit both using clang++ or g++.
Switching off xz (configure option --without-xz) solves the issue.
I attach the two compile logs, hope it is okay to do so.
Best Regards
Stefan
_______________________________________________
sword-devel mailing list: sword-devel at crosswire.org
http://www.crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.crosswire.org/pipermail/sword-devel/attachments/20140824/2755f13b/attachment-0001.html>
Karl Kleinpaste
2014-08-24 15:08:28 UTC
Permalink
I get the same build failure in Fedora 19, and your test program fails
on lack of sysdata.h.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.crosswire.org/pipermail/sword-devel/attachments/20140824/cfd6908a/attachment.html>
Stefan Husmann
2014-08-24 15:39:35 UTC
Permalink
Post by Troy A. Griffitts
Hi Stefan,
(the sword/examples/classes folder has an appropriate Makefile to build against sword if you want to drop it in that folder and then type: make <your filename>.cpp)
#include<sysdata.h>
#include<stdio.h>
int main(int argc, char **argv) {
printf("%ld\n", sizeof(__u64));
return 0;
}
Post by Stefan Husmann
Hello,
I have problems compiling sword in revision 3249 under Arch Linux 64 bit both using clang++ or g++.
Switching off xz (configure option --without-xz) solves the issue.
I attach the two compile logs, hope it is okay to do so.
Best Regards
Stefan
_______________________________________________
sword-devel mailing list: sword-devel at crosswire.org
http://www.crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page
_______________________________________________
sword-devel mailing list: sword-devel at crosswire.org
http://www.crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page
Hello,

sure, I get this:

[haawda at frege ~]$ LANG=C g++ how_big_is_u64.cpp -o how_big_is_u64.o
how_big_is_u64.cpp:1:20: fatal error: sysdata.h: No such file or directory
#include<sysdata.h>
^
compilation terminated.
[haawda at frege ~]$ LANG=C clang++ how_big_is_u64.cpp -o how_big_is_u64.o
how_big_is_u64.cpp:1:9: fatal error: 'sysdata.h' file not found
#include<sysdata.h>
^
1 error generated.

Best Regards
Stefan
Troy A. Griffitts
2014-08-24 15:49:14 UTC
Permalink
Sorry guys. The sword/examples/classes folder assumes you have some
version of sword installed. regardless, the only file the test program
needs is sword/include/sysdata.h. Just compile it however you'd like
and copy sword/include/sysdata.h to the current folder (and change the
<> to "" in the include statement if necessary.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Post by Troy A. Griffitts
Hi Stefan,
(the sword/examples/classes folder has an appropriate Makefile to build against sword if you want to drop it in that folder and then type: make <your filename>.cpp)
#include<sysdata.h>
#include<stdio.h>
int main(int argc, char **argv) {
printf("%ld\n", sizeof(__u64));
return 0;
}
Post by Stefan Husmann
Hello,
I have problems compiling sword in revision 3249 under Arch Linux 64 bit both using clang++ or g++.
Switching off xz (configure option --without-xz) solves the issue.
I attach the two compile logs, hope it is okay to do so.
Best Regards
Stefan
_______________________________________________
sword-devel mailing list: sword-devel at crosswire.org
http://www.crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page
_______________________________________________
sword-devel mailing list: sword-devel at crosswire.org
http://www.crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page
Hello,
[haawda at frege ~]$ LANG=C g++ how_big_is_u64.cpp -o how_big_is_u64.o
how_big_is_u64.cpp:1:20: fatal error: sysdata.h: No such file or directory
#include<sysdata.h>
^
compilation terminated.
[haawda at frege ~]$ LANG=C clang++ how_big_is_u64.cpp -o how_big_is_u64.o
how_big_is_u64.cpp:1:9: fatal error: 'sysdata.h' file not found
#include<sysdata.h>
^
1 error generated.
Best Regards
Stefan
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQEcBAEBAgAGBQJT+gc3AAoJEFB4KGhvDRgLPMUH/isUBHN2bjcpcQXRR0nvPcYw
vitWjpljsYIHpDZXrHBKxRGqFm7SiE8uuFsTjf7KazKi9zSESt50dgN1pUw/dUap
os5XZoSF48keFd8dwN7Qu6k7r7R2qaX9/qfVB4hcVJDvyTEghhodFbN2bHGXH1AL
WSsdYteR31/lLD7wdQHcCD6uUQMGxXR+ArBH0/89BwrRcCAYF8o3jBaRhlUcOBIZ
NOr/wshvlAdEEG2Q1x2FiyWjdoMIDedK9x2NTTw5yu6tCtCwxLPf1ixqzZM/tv8T
2m+dmOxAMf70Ygyea3pwU7xmeExN7izQ0YcZBOBqL/6vRjjZAAbM9xblXKTh7CY=
=SbbG
-----END PGP SIGNATURE-----
_______________________________________________
sword-devel mailing list: sword-devel at crosswire.org
http://www.crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page
Karl Kleinpaste
2014-08-24 16:23:28 UTC
Permalink
Post by Troy A. Griffitts
The sword/examples/classes folder assumes you have some
version of sword installed.
Come on, give me a break, of course I have Sword installed. If
compilation doesn't provide this right, then examples/classes/Makefile
is at fault.

Regardless, fixing the little test prog, output is 8.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.crosswire.org/pipermail/sword-devel/attachments/20140824/9ed364c6/attachment-0001.html>
Stefan Husmann
2014-08-24 16:45:39 UTC
Permalink
Post by Karl Kleinpaste
Post by Troy A. Griffitts
The sword/examples/classes folder assumes you have some
version of sword installed.
Come on, give me a break, of course I have Sword installed. If
compilation doesn't provide this right, then examples/classes/Makefile
is at fault.
Regardless, fixing the little test prog, output is 8.
_______________________________________________
sword-devel mailing list: sword-devel at crosswire.org
http://www.crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page
Also 8 here.
Greg Hellings
2014-08-24 17:04:53 UTC
Permalink
On Sun, Aug 24, 2014 at 11:23 AM, Karl Kleinpaste <karl at kleinpaste.org>
Post by Troy A. Griffitts
The sword/examples/classes folder assumes you have some
version of sword installed.
Come on, give me a break, of course I have Sword installed. If
compilation doesn't provide this right, then examples/classes/Makefile is
at fault.
The programs in examples/ are designed to be built (through the Makefile)
against the compiled but uninstalled version of the library. So they're
looking for Sword headers without any prefix directory in the include
directives. Once the files are installed they go to
$INSTALL_PREFIX/include/sword/ so building against the installed version of
the files would required the includes be prefixed with sword/ or the
appropriate -I$INSTALL_PREFIX/include/sword/ be added to the compiler
invocation when building manually.

--Greg
Post by Troy A. Griffitts
Regardless, fixing the little test prog, output is 8.
_______________________________________________
sword-devel mailing list: sword-devel at crosswire.org
http://www.crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.crosswire.org/pipermail/sword-devel/attachments/20140824/d02c65bb/attachment.html>
Troy A. Griffitts
2014-08-24 17:29:18 UTC
Permalink
I suspect this is a bug in the CMake build system.

do the other examples in that folder compile for you?

Look at the Makefile. It depends on pkg-config and that sword.pc was
built and installed in your system correctly.
Post by Karl Kleinpaste
Post by Troy A. Griffitts
The sword/examples/classes folder assumes you have some
version of sword installed.
Come on, give me a break, of course I have Sword installed. If
compilation doesn't provide this right, then examples/classes/Makefile
is at fault.
Regardless, fixing the little test prog, output is 8.
_______________________________________________
sword-devel mailing list: sword-devel at crosswire.org
http://www.crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.crosswire.org/pipermail/sword-devel/attachments/20140824/a5d76437/attachment.html>
Loading...