Cross-compiling for Windows

109 views
Skip to first unread message

Vanessa McHale

unread,
Aug 2, 2018, 10:59:15 PM8/2/18
to ats-lan...@googlegroups.com
Hi all,

Debian packages a cross-compiler targeting windows,
gcc-x86_64-w64-mingw32. Unfortunately, atslib fails to build with this,
due to the following error:


In file included from .atspkg/c/prelude/DATS/filebas.c:94:0:
/home/vanessa/.atspkg/0.3.11/lib/ats2-postiats-0.3.11/libats/libc/CATS/sys/types.cats:78:9:

error: unknown type name ‘uid_t’ typedef uid_t
atslib_libats_libc_uid_type ; ^~~~~
/home/vanessa/.atspkg/0.3.11/lib/ats2-postiats-0.3.11/libats/libc/CATS/sys/types.cats:79:9:


error: unknown type name ‘gid_t’ typedef gid_t
atslib_libats_libc_gid_type ; ^~~~~ )


Is this an upstream problem with the cross-compiler? Or is this
something I could work around?

Thanks,
Vanessa


signature.asc

Artyom Shalkhakov

unread,
Aug 2, 2018, 11:25:21 PM8/2/18
to ats-lang-users
Hi Vanessa,

пт, 3 авг. 2018 г. в 8:59, Vanessa McHale <vanessa...@iohk.io>:
I guess this is POSIX-specific stuff, so no, I don't think you directly map it to something that Windows understands, unless you fall back to Cygwin.

See also:


You could also search for "mingw" in the group to find other discussions as well.
 
Thanks,
Vanessa


--
You received this message because you are subscribed to the Google Groups "ats-lang-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ats-lang-user...@googlegroups.com.
To post to this group, send email to ats-lan...@googlegroups.com.
Visit this group at https://groups.google.com/group/ats-lang-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/ats-lang-users/2171b521-923c-a366-0b67-e4a1d791f354%40iohk.io.


--
Cheers,
Artyom Shalkhakov

Yannick Duchêne

unread,
Aug 3, 2018, 12:37:03 AM8/3/18
to ats-lang-users
Seems you are not the first one to face this issue : https://github.com/gotk3/gotk3/issues/204


As an example, it appears in a struct for password entry : http://pubs.opengroup.org/onlinepubs/7908799/xsh/pwd.h.html

I would be surprised this is really required to compile Postiats … must be an error or else I don’t see why it would be needed.

Hongwei Xi

unread,
Aug 3, 2018, 12:36:33 PM8/3/18
to ats-lan...@googlegroups.com
Here is an example showing how you can set up your own "run-time" for ATS:


Probably you don't really need to go that far. When I use ATS to implement a project, I usually
have a 'mylib' like this one:


I do not advocate the use of -latslib (i.e., libatslib.a, which is mostly built for the purpose of education).


--
You received this message because you are subscribed to the Google Groups "ats-lang-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ats-lang-users+unsubscribe@googlegroups.com.
To post to this group, send email to ats-lang-users@googlegroups.com.

Vanessa McHale

unread,
Aug 3, 2018, 12:39:03 PM8/3/18
to ats-lan...@googlegroups.com

Thanks, I'll have a look! I unfortunately do not have much experience with C/systems programming, but I this could be a good chance to brush up.

To unsubscribe from this group and stop receiving emails from it, send an email to ats-lang-user...@googlegroups.com.
To post to this group, send email to ats-lan...@googlegroups.com.
signature.asc
Reply all
Reply to author
Forward
0 new messages