From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from moutng.kundenserver.de ([212.227.17.10]) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1Rnt76-0003rG-6A for ptxdist@pengutronix.de; Thu, 19 Jan 2012 15:37:17 +0100 Received: from localhost ([127.0.0.1] helo=idefix.lespocky.dyndns.org) by idefix.lespocky.dyndns.org with esmtpa (Exim 4.77) (envelope-from ) id 1Rnt6w-00065e-SR for ptxdist@pengutronix.de; Thu, 19 Jan 2012 15:37:08 +0100 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=_b297625d767a9ccd3b74e6ca687e92a6" Date: Thu, 19 Jan 2012 15:37:06 +0100 From: Alexander Dahl Message-ID: <9aa177152ed039e1e18f4d7b6c2ebd6f@idefix.lespocky.dyndns.org> Subject: [ptxdist] building OpenNI with ptxdist Reply-To: ptxdist@pengutronix.de List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: ptxdist-bounces@pengutronix.de Errors-To: ptxdist-bounces@pengutronix.de To: PTXdist Developer Mailinglist --=_b297625d767a9ccd3b74e6ca687e92a6 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="utf-8" Hei hei, currently I'm working on building OpenNI [1] with ptxdist. I take the source from GitHub [2] and try writing an appropriate rules/openni.make – however this is not as easy as it seems. :( OpenNI does not use standard tools like autotools or cmake for uncomplicated cross compiling but some hand written Makefile. They have a very short section in their README how to cross compile: https://github.com/OpenNI/OpenNI/blob/master/README For doing this without ptxdist I create a folder ~/build/sysroot and tried cross compiling. Doing it like in the README this results in an error stating 'unistd.h' is not found. If I copy the content of /opt/OSELAS.Toolchain-2011.03.0/arm-v5te-linux-gnueabi/gcc-4.5.2-glibc-2.13-binutils-2.21-kernel-2.6.36-sanitized/sysroot-arm-v5te-linux-gnueabi to ~/build/sysroot/ first, compiling succeeds (after manually cross compiling libusb and installing it to ~/build/sysroot). In ptxdist compiling fails with the same error, the unistd.h is not found. There's none in my BSP in platform-at91.../sysroot-target – I guess all the other packages are able to find these libc include files somewhere else, maybe in the same subfolder of the toolchain. I assume I should not copy these files to sysroot-target and I should also not let the openni Makefile install stuff in my toolchain. The Makefile of OpenNI can be found at [3] but I'll also attach how far I got with my rule files. I tried finding out how autotools or cmake generate their Makefiles or what ptxdist calls in the compile stage so other packages find their stuff, but this is horribly complex. :-/ Maybe someone has a hint how to pass some parameter or patch the Makefile? I guess it lacks on some understanding of cross-compiling here. O:-) Alex [1] http://www.openni.org/ [2] https://github.com/OpenNI/OpenNI [3] https://github.com/OpenNI/OpenNI/blob/master/Platform/Linux/Build/Makefile -- »With the first link, the chain is forged. The first speech censured, the first thought forbidden, the first freedom denied, chains us all irrevocably.« (Jean-Luc Picard, quoting Judge Aaron Satie) *** GnuPG-FP: 02C8 A590 7FE5 CA5F 3601 D1D5 8FBA 7744 CC87 10D0 *** --=_b297625d767a9ccd3b74e6ca687e92a6 Content-Transfer-Encoding: base64 Content-Type: text/plain; name=openni.in Content-Disposition: attachment; filename=openni.in IyMgU0VDVElPTj1wcm9qZWN0X3NwZWNpZmljCgpjb25maWcgT1BFTk5JCgl0cmlzdGF0ZQoJc2Vs ZWN0IExJQlVTQgoJcHJvbXB0ICJvcGVubmkiCgloZWxwCgkgIFRoZSBPcGVuTkkgZnJhbWV3b3Jr IHByb3ZpZGVzIGFuIGFwcGxpY2F0aW9uIHByb2dyYW1taW5nIGludGVyZmFjZQoJICAoQVBJKSBm b3Igd3JpdGluZyBhcHBsaWNhdGlvbnMgdXRpbGl6aW5nIG5hdHVyYWwgaW50ZXJhY3Rpb24uIFRo aXMKCSAgQVBJIGNvdmVycyBjb21tdW5pY2F0aW9uIHdpdGggYm90aCBsb3cgbGV2ZWwgZGV2aWNl cyAoZS5nLiB2aXNpb24KCSAgYW5kIGF1ZGlvIHNlbnNvcnMpLCBhcyB3ZWxsIGFzIGhpZ2gtbGV2 ZWwgbWlkZGxld2FyZSBzb2x1dGlvbnMKCSAgKGUuZy4gZm9yIHZpc3VhbCB0cmFja2luZyB1c2lu ZyBjb21wdXRlciB2aXNpb24pLgoKCSAgU2VlIGh0dHA6Ly93d3cub3Blbm5pLm9yZy8gYW5kIGh0 dHBzOi8vZ2l0aHViLmNvbS9PcGVuTkkvT3Blbk5JCgojIHZpbTogZnQ9a2NvbmZpZyBub2V0IHR3 PTcyCg== --=_b297625d767a9ccd3b74e6ca687e92a6 Content-Transfer-Encoding: base64 Content-Type: text/plain; name=openni.make Content-Disposition: attachment; filename=openni.make IyAtKi1tYWtlZmlsZS0qLQojCiMgQ29weXJpZ2h0IChDKSAyMDEyIGJ5IEFsZXhhbmRlciBEYWhs IDxwb3N0QGxlc3BvY2t5LmRlPgojCiMgU2VlIENSRURJVFMgZm9yIGRldGFpbHMgYWJvdXQgd2hv IGhhcyBjb250cmlidXRlZCB0byB0aGlzIHByb2plY3QuCiMKIyBGb3IgZnVydGhlciBpbmZvcm1h dGlvbiBhYm91dCB0aGUgUFRYZGlzdCBwcm9qZWN0IGFuZCBsaWNlbnNlIGNvbmRpdGlvbnMKIyBz ZWUgdGhlIFJFQURNRSBmaWxlLgojCgojCiMgV2UgcHJvdmlkZSB0aGlzIHBhY2thZ2UKIwpQQUNL QUdFUy0kKFBUWENPTkZfT1BFTk5JKSArPSBvcGVubmkKCiMKIyBQYXRocyBhbmQgbmFtZXMKIwpP UEVOTklfVkVSU0lPTgk6PSAxLjUuMi4yMwpPUEVOTklfTUQ1CQk6PSAxMjM4OWM1NmJmMzY4NWE3 NDFmNmJjZmEwNjg1ODVmZgpPUEVOTkkJCQk6PSBvcGVubmktJChPUEVOTklfVkVSU0lPTikKT1BF Tk5JX1NVRkZJWAk6PSB0YXIuZ3oKT1BFTk5JX1VSTAkJOj0gaHR0cHM6Ly9naXRodWIuY29tL09w ZW5OSS9PcGVuTkkvdGFyYmFsbC9TdGFibGUtJChPUEVOTklfVkVSU0lPTikKT1BFTk5JX1NPVVJD RQk6PSAkKFNSQ0RJUik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CQoY2FsbCB0YXJnZXRpbmZvKQojCUAkKGNhbGwgY2xlYW5fcGtnLCBPUEVOTkkpCgojIHZp bTogZnQ9bWFrZSBub2V0Cg== --=_b297625d767a9ccd3b74e6ca687e92a6 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline -- ptxdist mailing list ptxdist@pengutronix.de --=_b297625d767a9ccd3b74e6ca687e92a6--