Welcome, Guest
Username: Password: Remember me
Discussions for CodeTyphon Studio Installation and Setup.
  • Page:
  • 1

TOPIC:

Can not cross compile Win32 to Linux. 12 years 7 months ago #1820

  • tom
  • tom's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 2
  • Thank you received: 0
I have installed CodeTyphon 2.5 and done the steps so the status shows for
Lazarus Win32 Cross element for i386-linux is OK. I then made a project in Lazarus and set the Project options for
Target OS = Linux Target CPU= i386 and Target processor = Default.
When I try to compile the app I get the following error:

C:\codetyphon\fpc\bin\i386-win32\i386-linux-ld.exe: cannot find -ldl
project1.lpr(20,1) Error: Error while linking
project1.lpr(20,1) Fatal: There were 1 errors compiling module, stopping

So any idea what I have done wrong or what else I need to check?

Is there a tutorial showing how to setup a project for Win32 to Linux compiling?

Thanks
Tom

Please Log in or Create an account to join the conversation.

Re: Can not cross compile Win32 to Linux. 12 years 7 months ago #1821

  • Konstantinos Papadoulas
  • Konstantinos Papadoulas's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 131
  • Thank you received: 19
Hi Tom,

as far as i am aware of there is no way (or at least an easy one) to perform cross-compile from Windows
to Linux. That is b/c windows is missing of some Linux libraries that the linker is searching.

Kostas

Please Log in or Create an account to join the conversation.

Re: Can not cross compile Win32 to Linux. 12 years 7 months ago #1822

  • Thomas
  • Thomas's Avatar
  • Offline
  • New Member
  • New Member
  • Posts: 3
  • Thank you received: 0
Actually I did manage to compile a i386 linux "hello world" program on Windows 7 (it worked well on a virtual machine linux), but then I had to reinstall and never managed to get it working again. So I guess it's possible but difficult.

Please Log in or Create an account to join the conversation.

Re: Can not cross compile Win32 to Linux. 12 years 7 months ago #1826

  • tom
  • tom's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 2
  • Thank you received: 0
The CodeTyphon help has a table listing the Lazarus IDE Build Capabilities and it shows Win32 Host supporting many Target OS layers.
(Arm-Linux, Arm-WinCE, i386-Linux, etc - 9 total).

So if there are other steps needed to get this to work then it would be helpful if the help doc would list them or where else to look.

The help doc did have another section of Crossbuild for Windows Mobile and Android but nothing for all of the other Target CPUs.

So do I need to find this in some Lazarus doc instead?

Thanks

Please Log in or Create an account to join the conversation.

Last edit: by tom. Reason: mistype

Re: Can not cross compile Win32 to Linux. 12 years 7 months ago #1838

  • Rain
  • Rain's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 71
  • Thank you received: 8
It cross compiles from Windows to Linux, if you supply the Linux Libraries somewhere on the Windows filesystem, e.g. c:\lazarusLinux32\

Just point in the project settings to that directory, as shown in the attached picture.
The libs should actually copied there, from a real Linux system, or from the 7z-Archive, that is attached (that should work at least with Ubuntu, maybe also with Suse and others).
The cleaner solution is always to copy the libs from the real target system to your windows file system.



[attachment:2]lazarusLinux32.7z[/attachment]

Edit: is there a size limit for attachments ? Could not succeed uploading the 8 MB 7z-file.
.
The following user(s) said Thank You: Irwanto, Miguel

Please Log in or Create an account to join the conversation.

Last edit: by Rain.

Re: Can not cross compile Win32 to Linux. 12 years 7 months ago #1839

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4535
  • Thank you received: 1114
Yes Sir
the limit is 2Mbytes
please, upload file to a file hosting site or
use volumes of 2Mbytes
PilotLogic Architect and Core Programmer

Please Log in or Create an account to join the conversation.

Last edit: by Sternas Stefanos.

Re: Can not cross compile Win32 to Linux. 12 years 7 months ago #1840

  • Rain
  • Rain's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 71
  • Thank you received: 8
Ok, wanted to ease the pain collecting the files by providing the 7z archive, but here is at least the file list, that was sufficient to cross-link successfully from Win to Linux:

c:\
lazarusLinux32\
~~~~~~~~~~~~~~~~
libatk-1.0.so
libc.so
libcairo.so
libdl.so
libgdk-x11-2.0.so
libgdk_pixbuf-2.0.so
libglib-2.0.so
libgmodule-2.0.so
libgobject-2.0.so
libgthread-2.0.so
libgtk-x11-2.0.so
libpango-1.0.so
libpthread.so
libpthread.so.0
libX11.so


lazarusLinux32\lib\
~~~~~~~~~~~~~~~~~~~
ld-2.11.3.so
ld-linux.so.2
libacl.so.1
libacl.so.1.1.0
libaio.so.1
libaio.so.1.0.1
libanl-2.11.3.so
libanl.so.1
libapparmor.la
libapparmor.so
libapparmor.so.1
libapparmor.so.1.0.2
libattr.so.1
libattr.so.1.1.0
libaudit.so.1
libaudit.so.1.0.0
libauparse.so.0
libauparse.so.0.0.0
libblkid.so.1
libblkid.so.1.1.0
libBrokenLocale-2.11.3.so
libBrokenLocale.so.1
libbz2.so.1
libbz2.so.1.0.6
libc-2.11.3.so
libc.so.6
libcap-ng.so.0
libcap-ng.so.0.0.0
libcap.so.2
libcap.so.2.19
libcidn-2.11.3.so
libcidn.so.1
libcom_err.so.2
libcom_err.so.2.1
libcrypt-2.11.3.so
libcrypt.so.1
libcrypto.so.1.0.0
libcryptsetup.so.1
libcryptsetup.so.1.1.0
libdaemon.so.0
libdaemon.so.0.5.0
libdbus-1.so.3
libdbus-1.so.3.5.3
libdevmapper-event-lvm2.so
libdevmapper-event-lvm2.so.2.02
libdevmapper-event-lvm2mirror.so
libdevmapper-event-lvm2mirror.so.2.02
libdevmapper-event-lvm2snapshot.so
libdevmapper-event-lvm2snapshot.so.2.02
libdevmapper-event.so.1.02
libdevmapper.so.1.02
libdl-2.11.3.so
libdl.so.2
libdmraid-events-isw.so
libdmraid-events-isw.so.1.0.0.rc16-3
libdmraid.so.1.0.0.rc16-3
libe2p.so.2
libe2p.so.2.3
libexpat.so.1
libexpat.so.1.5.2
libext2fs.so.2
libext2fs.so.2.4
libfreebl3.chk
libfreebl3.so
libgcc_s.so.1
libgcrypt.so.11
libgcrypt.so.11.6.0
libgio-2.0.so.0
libgio-2.0.so.0.2800.0
libglib-2.0.so.0
libglib-2.0.so.0.2800.0
libgmodule-2.0.so.0
libgmodule-2.0.so.0.2800.0
libgobject-2.0.so.0
libgobject-2.0.so.0.2800.0
libgpg-error.so.0
libgpg-error.so.0.7.0
libgssglue.so.1
libgssglue.so.1.0.0
libgthread-2.0.so.0
libgthread-2.0.so.0.2800.0
libgudev-1.0.so.0
libgudev-1.0.so.0.1.0
libhandle.so.1
libhandle.so.1.0.3
libhistory.so.6
libhistory.so.6.1
libimmunix.la
libimmunix.so
libimmunix.so.1
libimmunix.so.1.0.2
libkeyutils-1.3.so
libkeyutils.so.1
liblvm2cmd.so
liblvm2cmd.so.2.02
liblzma.so.5
liblzma.so.5.0.0
liblzo2.so.2
liblzo2.so.2.0.0
libm-2.11.3.so
libm.so.6
libmemusage.so
libmount.so.1
libmount.so.1.1.0
libmultipath.so.0
libncurses.so.5
libncurses.so.5.7
libncurses.so.6
libncurses.so.6.0
libncursesw.so.5
libncursesw.so.5.7
libncursesw.so.6
libncursesw.so.6.0
libnl.so.1
libnl.so.1.1
libnscd.so.1
libnscd.so.1.0.2
libnsl-2.11.3.so
libnsl.so.1
libnss_compat-2.11.3.so
libnss_compat.so.2
libnss_dns-2.11.3.so
libnss_dns.so.2
libnss_files-2.11.3.so
libnss_files.so.2
libnss_hesiod-2.11.3.so
libnss_hesiod.so.2
libnss_ldap.so.2
libnss_mdns.so.2
libnss_mdns4.so.2
libnss_mdns4_minimal.so.2
libnss_mdns6.so.2
libnss_mdns6_minimal.so.2
libnss_mdns_minimal.so.2
libnss_nis-2.11.3.so
libnss_nis.so.2
libnss_nisplus-2.11.3.so
libnss_nisplus.so.2
libnss_sss.so.2
libnss_wins.so.2
libntfs-3g.so.80
libntfs-3g.so.80.0.0
libpam.so.0
libpam.so.0.83.0
libpamc.so.0
libpamc.so.0.82.1
libpam_misc.so.0
libpam_misc.so.0.82.0
libpci.so.3
libpci.so.3.1.7
libpcprofile.so
libpcre.so.0
libpcre.so.0.0.1
libpopt.so.0
libpopt.so.0.0.0
libpthread-2.11.3.so
libpthread.so.0
libreadline.so.6
libreadline.so.6.1
libresolv-2.11.3.so
libresolv.so.2
librt-2.11.3.so
librt.so.1
libSegFault.so
libselinux.so.1
libsepol.so.1
libss.so.2
libss.so.2.0
libssl.so.1.0.0
libsysfs.so.2
libsysfs.so.2.0.1
libthread_db-1.0.so
libthread_db.so.1
libtirpc.so.1
libtirpc.so.1.0.10
libudev.so.0
libudev.so.0.10.0
libutil-2.11.3.so
libutil.so.1
libuuid.so.1
libuuid.so.1.3.0
libwrap.so.0
libwrap.so.0.7.6
libxcrypt.so.2
libxcrypt.so.2.0.0
libz.so.1
libz.so.1.2.5


lazarusLinux32\usr_lib\
~~~~~~~~~~~~~~~~~~~~~~~~
libfontconfig.so.1
libfreetype.so.6
libpangocairo-1.0.so.0
libpangoft2-1.0.so.0
libpixman-1.so.0
libpng14.so.14
libXau.so.6
libxcb.so.1
libXcomposite.so.1
libXcursor.so.1
libXdamage.so.1
libXext.so.6
libXfixes.so.3
libXi.so.6
libXinerama.so.1
libXrandr.so.2
libXrender.so.1

Please Log in or Create an account to join the conversation.

Re: Can not cross compile Win32 to Linux. 12 years 7 months ago #1843

  • Gintas
  • Gintas's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Graphics Designer/Developer
  • Posts: 32
  • Thank you received: 3
It's easy when you have Ext3 filesystem drivers installed and can point Lazarus to Linux lib folder.
I believe QT requires pretty much less libraries.

Ext2/Ext3 Drivers
www.ext2fsd.com/
The following user(s) said Thank You: xichen li

Please Log in or Create an account to join the conversation.

  • Page:
  • 1