Porting GNU libraries

Aditya Kousik adit267.kousik at ...9...
Tue May 5 17:18:30 CEST 2015


I'm facing some issues trying to compile the library. In the lib/mk folder,
I've added a boost.mk file, which I initially did not set SRC_CC to any
value since most of the boost libraries are inline functions. But some
components need to be built, so when I added a sample file like this:

BOOST_DIR = $(call select_from_ports,boost)/src/lib/boost
SRC_CC := $(BOOST_DIR)/libs/chrono/src/*.cc
INC_DIR += $(BOOST_DIR)
vpath %.cc $(BOOST_DIR)/libs/chrono/src
LIBS += libc
SHARED_LIB = yes

During build, it gives me the following error
Library boost
    MERGE    boost.lib.so
/usr/local/genode-gcc/bin/genode-x86-ld: cannot find
/media/adikou/work/proj/genode/contrib/boost-ccb441998a237b6f3a301a2fd5956aca99eb9bc8/src/lib/boost/libs/chrono/src/*.o:
No such file or directory


On Mon, May 4, 2015 at 11:04 PM, Aditya Kousik <adit267.kousik at ...9...>
wrote:

> Thank you for the response. I've sort of generated a port for a part of
> the boost libraries. It builds the src/lib/boost in the contrib folder, the
> dummy application links the library also. (How do I run applications built
> on linux_x86 platform?) The boost libraries are mainly .hpp files. By
> dependencies, I meant, header files #including other header files.
>
> For instance: for simplicity, if I set DIRS_CONTENT(include/regex) :=
> src/lib/boost/boost/regex/regex.hpp. But the actual header file simply has
> more includes to header files in the same directory, does the build system
> recognise this?
>
> Cheers
> Aditya
> On May 4, 2015 22:56, "Josef Söntgen" <josef.soentgen at ...1...>
> wrote:
>
>> Hello Aditya,
>>
>> * Aditya Kousik <adit267.kousik at ...9...> [2015-05-04 20:15:16 -0700]:
>>
>> > If I get the order of the .port and libports/lib/mk/<port-name>.mk
>> right,
>> > DIRS and DIRS_CONTENT are the generated/copied headers during the build;
>> > and INC_DIR in the .mk file configures make to look at the current
>> folder
>> > for local includes.
>>
>> Yes, directories in DIRS get populated from the content in DIRS_CONTENT
>> while preparing the port. Basically, the populated include directory
>> should only contain the files that are needed on Genode. The same goes
>> for the src directory, although we do not do that for most small
>> libraries/applications but only for larger ones (VirtualBox, Linux
>> sources etc).
>>
>> > I'm asking this because if the include files that appear in
>> > contrib-<hash>/src/lib/include have multiple dependencies, the build
>> will
>> > still work, right? I'm guessing the headers in the DIRS are just for the
>> > genode application to include and the build system takes the actual src
>> > while compiling.
>>
>> Actually, these header files are also used by the library/application
>> itself. If the libraries depend on other libraries you only have
>> to add the library to the LIBS variable in the .mk file and the build
>> system will try to pick up the matching import-<port-name>.mk file.
>> This in return will extend INC_DIR, that is used by the build system
>> to generate the right compiler flags.
>>
>> On that account, the INC_DIR variable in the import file should only
>> contain the public header paths used by other libraries/applications.
>> In the lib/target.mk file it is fine to point the build system and
>> thereby the compiler to other directories in addition, e.g.
>> $(REP_DIR)/src/lib/<port-name> or even contrib-<hash>/src. In this
>> regard, the SDL port is a good example.
>>
>>
>> Regards
>> Josef
>>
>>
>> ------------------------------------------------------------------------------
>> One dashboard for servers and applications across Physical-Virtual-Cloud
>> Widest out-of-the-box monitoring support with 50+ applications
>> Performance metrics, stats and reports that give you Actionable Insights
>> Deep dive visibility with transaction tracing using APM Insight.
>> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
>> _______________________________________________
>> genode-main mailing list
>> genode-main at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/genode-main
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.genode.org/pipermail/users/attachments/20150505/1adaddb7/attachment.html>


More information about the users mailing list