[GSoC 2020: Daily Update]: Building EPICS with RTEMS5

Vijay Kumar Banerjee vijay at rtems.org
Thu Jul 2 18:40:45 UTC 2020


On Fri, Jul 3, 2020 at 12:00 AM Mritunjay Sharma
<mritunjaysharma394 at gmail.com> wrote:
>
> I guess the problem can be with my using 'sudo' here
> but without using sudo and directly using 'make install',
> the process stops all the more early with the following error:
>

Please try `sudo chmod +x $HOME/development/rtems_dev/rtems-4.10.2/`

> "Making install in make
> make[1]: Entering directory '/home/mritunjay/development/rtems_dev/rtems-4.10.2/pc-386/make'
> make[2]: Entering directory '/home/mritunjay/development/rtems_dev/rtems-4.10.2/pc-386/make'
> make[2]: Nothing to be done for 'install-exec-am'.
>  /bin/mkdir -p '/home/development/rtems_dev/rtems-4.10.2/make'
>  /usr/bin/install -c -m 644 ../../make/main.cfg ../../make/leaf.cfg '/home/development/rtems_dev/rtems-4.10.2/make'
> /usr/bin/install: cannot remove '/home/development/rtems_dev/rtems-4.10.2/make/main.cfg': Permission denied
> /usr/bin/install: cannot remove '/home/development/rtems_dev/rtems-4.10.2/make/leaf.cfg': Permission denied
> Makefile:265: recipe for target 'install-dist_rtems_makeDATA' failed
> make[2]: *** [install-dist_rtems_makeDATA] Error 1
> make[2]: Leaving directory '/home/mritunjay/development/rtems_dev/rtems-4.10.2/pc-386/make'
> Makefile:379: recipe for target 'install-am' failed
> make[1]: *** [install-am] Error 2
> make[1]: Leaving directory '/home/mritunjay/development/rtems_dev/rtems-4.10.2/pc-386/make'
> Makefile:304: recipe for target 'install-recursive' failed
> make: *** [install-recursive] Error 1"
>
>
> On Thu, Jul 2, 2020 at 11:47 PM Mritunjay Sharma <mritunjaysharma394 at gmail.com> wrote:
>>
>> Hello Heinz and everyone,
>>
>> Thank you so much, using RTEMS RSB for 4.10 really helped me a lot and saved a lot of time.
>> Though in all this it was a good learning experience for how to build the compiler
>> tools manually too :-)
>>
>> The make was successful this time and the previous error was resolved but after the make while using 'sudo make install', I have got another error as following:
>> " ...( cd '/home/development/rtems_dev/rtems-4.10.2/i386-rtems4.10/pc386/lib' && i386-rtems4.10-ranlib libsapi.a )
>> /bin/bash: line 5: i386-rtems4.10-ranlib: command not found
>> Makefile:366: recipe for target 'install-project_libLIBRARIES' failed
>> make[5]: *** [install-project_libLIBRARIES] Error 127
>> make[5]: Leaving directory '/home/mritunjay/development/rtems_dev/rtems-4.10.2/pc-386/i386-rtems4.10/c/pc386/cpukit/sapi'
>> Makefile:952: recipe for target 'install-am' failed
>> make[4]: *** [install-am] Error 2
>> make[4]: Leaving directory '/home/mritunjay/development/rtems_dev/rtems-4.10.2/pc-386/i386-rtems4.10/c/pc386/cpukit/sapi'
>> Makefile:785: recipe for target 'install-recursive' failed
>> make[3]: *** [install-recursive] Error 1
>> make[3]: Leaving directory '/home/mritunjay/development/rtems_dev/rtems-4.10.2/pc-386/i386-rtems4.10/c/pc386/cpukit'
>> Makefile:425: recipe for target 'install-recursive' failed
>> make[2]: *** [install-recursive] Error 1
>> make[2]: Leaving directory '/home/mritunjay/development/rtems_dev/rtems-4.10.2/pc-386/i386-rtems4.10/c/pc386'
>> Makefile:286: recipe for target 'install-recursive' failed
>> make[1]: *** [install-recursive] Error 1
>> make[1]: Leaving directory '/home/mritunjay/development/rtems_dev/rtems-4.10.2/pc-386/i386-rtems4.10/c'
>> Makefile:304: recipe for target 'install-recursive' failed
>> make: *** [install-recursive] Error 1"
>>
>> I am trying to figure out on what can be the reason behind this, it will be kind of
>> you all to guide help this fix.
>>
>> Thanks,
>> Mritunjay
>>
>>
>>
>>
>> On Thu, Jul 2, 2020 at 9:59 AM Heinz Junkes <junkes at fhi-berlin.mpg.de> wrote:
>>>
>>> Hello, Mritunjay,
>>>
>>> why not use the RTEMS Resource builder for 4.10 ?
>>> Heinz
>>>
>>>
>>> > On 1. Jul 2020, at 20:03, Mritunjay Sharma <mritunjaysharma394 at gmail.com> wrote:
>>> >
>>> > Hi Gedare,
>>> >
>>> > Thank you so much, since I had the experience of RSB toolchain till now,
>>> > I forgot to build the RTEMS compiler toolchain.
>>> >
>>> > Today's update is also this that I spent the day figuring out how
>>> > to build it manually and got some really amazing blogs
>>> > which have helped me (though they were a bit difficult to find because most pages have been
>>> > relocated).
>>> > Sharing the resources which I have used today and that are helping me build RTEMS compiler toolchain for 4.10.
>>> >
>>> > http://heshamelmatary.blogspot.com/2014/06/howto-build-rtems-tool-chain-for.html
>>> > https://docs.rtems.org/releases/4.5.0/rtemsdoc-4.5.0/share/rtemsdoc/html/started/started00040.html
>>> > https://ftp.rtems.org/pub/rtems/releases/4.10/tools/
>>> >
>>> > I am now applying patches for gdb, gcc, binutils and most
>>> > probably hope that the build will be successful.
>>> >
>>> > As suggested by Heinz, I am improving the blog as well and will post the updated and better
>>> > version of blog by Friday.
>>> >
>>> > Thanks,
>>> > Mritunjay
>>> >
>>> > On Wed, Jul 1, 2020 at 9:25 AM Gedare Bloom <gedare at rtems.org> wrote:
>>> > On Tue, Jun 30, 2020 at 9:42 PM Mritunjay Sharma
>>> > <mritunjaysharma394 at gmail.com> wrote:
>>> > >
>>> > > Hi Gedare,
>>> > >
>>> > > Thank you for the quick response, I tried using --target=i386-rtems4.10, which again
>>> > > gave me the same error.
>>> > >
>>> > Did you build an RTEMS compiler toolchain for 4.10? and install it to
>>> > a prefix in your $PATH?
>>> >
>>> > > "checking for RTEMS_CPU_MODEL... i386_fp
>>> > > checking for RTEMS_BSP_FAMILY... pc386
>>> > > checking for CPU_CFLAGS... (cached) -mtune=i386
>>> > > checking for CFLAGS_OPTIMIZE_V... (cached) -O2 -g
>>> > > checking for style of include used by make... GNU
>>> > > checking for i386-rtems4.10-gcc... no
>>> > > configure: error: no acceptable cc found in $PATH
>>> > > Makefile:712: recipe for target 'pc386' failed
>>> > > make[2]: *** [pc386] Error 1
>>> > > make[2]: Leaving directory '/home/mritunjay/development/rtems-4.10.2/pc-386/i386-rtems4.10/c'
>>> > > Makefile:257: recipe for target 'all-recursive' failed
>>> > > make[1]: *** [all-recursive] Error 1
>>> > > make[1]: Leaving directory '/home/mritunjay/development/rtems-4.10.2/pc-386/i386-rtems4.10/c'
>>> > > Makefile:275: recipe for target 'all-recursive' failed
>>> > > make: *** [all-recursive] Error 1"
>>> > >
>>> > > Mritunjay
>>> > >
>>> > > On Wed, Jul 1, 2020 at 3:48 AM Gedare Bloom <gedare at rtems.org> wrote:
>>> > >>
>>> > >>  Use --target=i386-rtems4.10 instead of  --target=i386-rtems
>>> > >>
>>> > >> Does this work with 4.10.3/4.10 HEAD?
>>> > >>
>>> > >> On Tue, Jun 30, 2020 at 3:54 PM Mritunjay Sharma
>>> > >> <mritunjaysharma394 at gmail.com> wrote:
>>> > >> >
>>> > >> > Hello everyone,
>>> > >> >
>>> > >> > I followed the documentation here https://docs.rtems.org/releases/rtemsdocs-4.10.2/share/rtems/pdf/started.pdf and
>>> > >> > started building RTEMS (4.10.2) for target architecture: i386 and BSP: pc386. The configure seemed to be fine
>>> > >> > after entering the following command:
>>> > >> > "../configure --target=i386-rtems --disable-posix --enable-cxx --enable-rtemsbsp=pc386 --enable-tests=samples --prefix=/home/development/rtems-4.10.2"
>>> > >> >
>>> > >> > However, the make failed with the following error: checking for i386-rtems-gcc... no
>>> > >> > "configure: error: no acceptable cc found in $PATH
>>> > >> > Makefile:712: recipe for target 'pc386' failed
>>> > >> > make[2]: *** [pc386] Error 1
>>> > >> > make[2]: Leaving directory '/home/mritunjay/development/rtems-4.10.2/pc386/i386-rtems/c'
>>> > >> > Makefile:257: recipe for target 'all-recursive' failed
>>> > >> > make[1]: *** [all-recursive] Error 1
>>> > >> > make[1]: Leaving directory '/home/mritunjay/development/rtems-4.10.2/pc386/i386-rtems/c'
>>> > >> > Makefile:275: recipe for target 'all-recursive' failed
>>> > >> > make: *** [all-recursive] Error 1"
>>> > >> >
>>> > >> > I checked that gcc is already installed in /usr/bin/gcc.
>>> > >> > So I am not able to figure out what exactly is causing the error.
>>> > >> > Please help to figure out what is causing this and how it can be resolved.
>>> > >> > I have attached the config log as well.
>>> > >> >
>>> > >> > Thanks
>>> > >> > Mritunjay
>>> > >> >
>>> > >> >
>>> > >> >
>>> > >> >
>>> > >> >
>>> > >> >
>>> > >> > On Wed, Jul 1, 2020 at 12:27 AM Mritunjay Sharma <mritunjaysharma394 at gmail.com> wrote:
>>> > >> >>
>>> > >> >>
>>> > >> >> I mistakenly forgot to cc my other mentors.
>>> > >> >>
>>> > >> >> This is what I responded :
>>> > >> >>
>>> > >> >>> Hello Heinz,
>>> > >> >>>
>>> > >> >>> Pardon the mistake I did in haste,
>>> > >> >>> as I advised by you I am now building it for RTEMS 4.10 and then I will
>>> > >> >>> be reporting here shortly as the build completes.
>>> > >> >>>
>>> > >> >>> Thanks
>>> > >> >>> Mritunjay.
>>> > >> >>
>>> > >> >>
>>> > >> >> I am shortly sending the email for the progress I made after working on above.
>>> > >> >> Thanks
>>> > >> >> Mritunjay
>>> > >> >>
>>> > >> >>
>>> > >> >>
>>> > >> >> On Wed, Jul 1, 2020 at 12:11 AM Heinz Junkes <junkes at fhi-berlin.mpg.de> wrote:
>>> > >> >>>
>>> > >> >>> Hello, Mritunjay,
>>> > >> >>>
>>> > >> >>> the epics-base version in github does not work with RTEMS5 It needs my extensions for this.
>>> > >> >>> Therefore I suggested that you first build epics7 for e.g. RTEMS 4.10.
>>> > >> >>> Then the easiest way is to build epics7 for RTEMS-pc386-qemu. This is fully supported.
>>> > >> >>> So you learn how to build EPics and then you can develop a first rsb-set for it.
>>> > >> >>> If this works, we will work on RTEMS5 and xilinx-Zynq.
>>> > >> >>> Heinz
>>> > >> >>>
>>> > >> >>> > On 30. Jun 2020, at 20:10, Mritunjay Sharma <mritunjaysharma394 at gmail.com> wrote:
>>> > >> >>> >
>>> > >> >>> >
>>> > >> >>> > Hello everyone,
>>> > >> >>> >
>>> > >> >>> > While yesterday, I completed the blog for the progress
>>> > >> >>> > till date, today I started the coding part.
>>> > >> >>> >
>>> > >> >>> > The tutorial that Heinz sent me yesterday guided
>>> > >> >>> > me to make the following changes:
>>> > >> >>> >
>>> > >> >>> > 1) epics-base/configure/CONFIG_SITE:
>>> > >> >>> > # Which target architectures to cross-compile for.
>>> > >> >>> > #  Definitions in configure/os/CONFIG_SITE.<host>.Common
>>> > >> >>> > #  may override this setting.
>>> > >> >>> > -CROSS_COMPILER_TARGET_ARCHS=
>>> > >> >>> > - #CROSS_COMPILER_TARGET_ARCHS=vxWorks-ppc32
>>> > >> >>> > + CROSS_COMPILER_TARGET_ARCHS=pc386
>>> > >> >>> > +#CROSS_COMPILER_TARGET_ARCHS=RTEMS-xilinx_zynq_a9_qemu
>>> > >> >>> >
>>> > >> >>> > I did not use xilinx_zynq_a9_qemu for now because I could
>>> > >> >>> > not locate CONFIG.Common.RTEMS-xilinx_zynq_a9_qemu
>>> > >> >>> > as of now in epics-base/configure/os.
>>> > >> >>> >
>>> > >> >>> > 2) configure/os/CONFIG_SITE.Common.RTEMS :
>>> > >> >>> >
>>> > >> >>> > # Where to find RTEMS
>>> > >> >>> > #
>>> > >> >>> > # APS:
>>> > >> >>> > -RTEMS_VERSION = 4.10.2
>>> > >> >>> > -RTEMS_BASE = /usr/local/vw/rtems/rtems-$(RTEMS_VERSION)
>>> > >> >>> > #RTEMS_VERSION = 4.10.2
>>> > >> >>> > #RTEMS_BASE = /usr/local/vw/rtems/rtems-$(RTEMS_VERSION)
>>> > >> >>> >
>>> > >> >>> > +# FHI:
>>> > >> >>> > +RTEMS_SERIES = 5
>>> > >> >>> > +RTEMS_VERSION = 5
>>> > >> >>> > +RTEMS_BASE = /home/mritunjay/development/rtems/5
>>> > >> >>> >
>>> > >> >>> > I thought to straightaway move with building it with RTEMS 5
>>> > >> >>> > because I have done it earlier for beatnik.
>>> > >> >>> >
>>> > >> >>> > After this as an experiment, I tried the make command which,
>>> > >> >>> > as expected, generated the following error:
>>> > >> >>> >
>>> > >> >>> > "make[4]: *** No rule to make target '../O.Common/osiFileName.h', needed by 'inc'.  Stop.
>>> > >> >>> > make[4]: Leaving directory '/home/mritunjay/development/EPICS/epics-base/modules/libcom/src/O.pc386'
>>> > >> >>> > ../../../configure/RULES_ARCHS:58: recipe for target 'install.pc386' failed
>>> > >> >>> > make[3]: *** [install.pc386] Error 2
>>> > >> >>> > make[3]: Leaving directory '/home/mritunjay/development/EPICS/epics-base/modules/libcom/src'
>>> > >> >>> > ../../configure/RULES_DIRS:85: recipe for target 'src.install' failed
>>> > >> >>> > make[2]: *** [src.install] Error 2
>>> > >> >>> > make[2]: Leaving directory '/home/mritunjay/development/EPICS/epics-base/modules/libcom'
>>> > >> >>> > ../configure/RULES_DIRS:85: recipe for target 'libcom.install' failed
>>> > >> >>> > make[1]: *** [libcom.install] Error 2
>>> > >> >>> > make[1]: Leaving directory '/home/mritunjay/development/EPICS/epics-base/modules'
>>> > >> >>> > configure/RULES_DIRS:85: recipe for target 'modules.install' failed
>>> > >> >>> > make: *** [modules.install] Error 2
>>> > >> >>> > "
>>> > >> >>> > I then re-visited to what I did with beatnik and made the following changes to
>>> > >> >>> > start with adding support for RTEMS 5:
>>> > >> >>> >
>>> > >> >>> > diff --git a/configure/CONFIG_COMMON b/configure/CONFIG_COMMON
>>> > >> >>> > index 6c0e11e0d..d56802968 100644
>>> > >> >>> > --- a/configure/CONFIG_COMMON
>>> > >> >>> > +++ b/configure/CONFIG_COMMON
>>> > >> >>> > @@ -142,9 +142,10 @@ BUILDLIB_SUFFIX = $(BUILDLIB_SUFFIX_$(SHARED_LIBRARIES))
>>> > >> >>> >  #--------------------------------------------------
>>> > >> >>> >  # vpath directories
>>> > >> >>> >  POSIX_YES = os/posix
>>> > >> >>> > +OS_IMPL_DIRS = $(if $(OS_API),os/$(OS_CLASS)-$(OS_API),) os/$(OS_CLASS)
>>> > >> >>> >  GENERIC_SRC_DIRS = .. $(SRC_DIRS)
>>> > >> >>> >  OS_SRC_DIRS += . $(foreach dir, .. $(SRC_DIRS), \
>>> > >> >>> > -       $(addprefix $(dir)/, os/$(OS_CLASS) $(POSIX_$(POSIX)) os/default ))
>>> > >> >>> > +       $(addprefix $(dir)/, $(OS_IMPL_DIRS) $(POSIX_$(POSIX)) os/default ))
>>> > >> >>> >  CMPLR_SRC_DIRS += . $(foreach dir, .. $(SRC_DIRS), \
>>> > >> >>> >         $(addprefix $(dir)/, compiler/$(CMPLR_CLASS) compiler/default ))
>>> > >> >>> >  ALL_SRC_DIRS = $(CMPLR_SRC_DIRS) $(OS_SRC_DIRS) $(GENERIC_SRC_DIRS)
>>> > >> >>> > diff --git a/configure/CONFIG_SITE b/configure/CONFIG_SITE
>>> > >> >>> > index 09b4c1525..f3aa4b3f7 100644
>>> > >> >>> > --- a/configure/CONFIG_SITE
>>> > >> >>> > +++ b/configure/CONFIG_SITE
>>> > >> >>> > @@ -161,7 +161,7 @@ USE_POSIX_THREAD_PRIORITY_SCHEDULING = YES
>>> > >> >>> >
>>> > >> >>> >  # Site version number, if set will append '-' and this string to the
>>> > >> >>> >  #  EPICS version number string that is reported by many tools.
>>> > >> >>> > -EPICS_SITE_VERSION =
>>> > >> >>> > +EPICS_SITE_VERSION =
>>> > >> >>> >
>>> > >> >>> >  # For GNU compiler, use pipes rather than temporary files for
>>> > >> >>> >  #  communication between the various stages of compilation.
>>> > >> >>> > diff --git a/configure/os/CONFIG.Common.RTEMS b/configure/os/CONFIG.Common.RTEMS
>>> > >> >>> > index 8425e6ef9..929510d61 100644
>>> > >> >>> > --- a/configure/os/CONFIG.Common.RTEMS
>>> > >> >>> > +++ b/configure/os/CONFIG.Common.RTEMS
>>> > >> >>> > @@ -94,16 +94,28 @@ MODEXT=.obj
>>> > >> >>> >  # operating system class (include/os/<os_class>)
>>> > >> >>> >  OS_CLASS = RTEMS
>>> > >> >>> >
>>> > >> >>> > +#--------------------------------------------------
>>> > >> >>> > +# operating system API (src/os/<os_class>-<os-api>)
>>> > >> >>> > +OS_API_4.7 = kernel
>>> > >> >>> > +OS_API_4.8 = kernel
>>> > >> >>> > +OS_API_4.9 = kernel
>>> > >> >>> > +OS_API_4.10 = kernel
>>> > >> >>> > +OS_API = $(firstword $(OS_API_$(RTEMS_SERIES)) posix)
>>> > >> >>> > +
>>> > >> >>> >  #--------------------------------------------------
>>> > >> >>> >  # Operating system flags
>>> > >> >>> > -OP_SYS_LDLIBS += -lrtemsCom -lc -lrtemscpu -lCom -lnfs -lm
>>> > >> >>> > -OP_SYS_LDFLAGS += $(CPU_CFLAGS) -u Init \
>>> > >> >>> > +OP_SYS_LDLIBS += -lrtemsCom -lc -lrtemscpu -lCom -lnfs -lm
>>> > >> >>> > +# newest Rtems > 2019 needs this -ltftpfs
>>> > >> >>> > +
>>> > >> >>> > +OP_SYS_LDFLAGS_posix += -u POSIX_Init
>>> > >> >>> > +OP_SYS_LDFLAGS_kernel += $(CPU_CFLAGS) -u Init \
>>> > >> >>> >                   $(PROJECT_RELEASE)/lib/no-dpmem.rel \
>>> > >> >>> >                   $(PROJECT_RELEASE)/lib/no-mp.rel \
>>> > >> >>> >                   $(PROJECT_RELEASE)/lib/no-part.rel \
>>> > >> >>> >                   $(PROJECT_RELEASE)/lib/no-signal.rel \
>>> > >> >>> >                   $(PROJECT_RELEASE)/lib/no-rtmon.rel
>>> > >> >>> >
>>> > >> >>> > +OP_SYS_LDFLAGS += $(CPU_FLAGS) $(OP_SYS_LDFLAGS_$(OS_API))
>>> > >> >>> >  MOD_SYS_LDFLAGS += $(CPU_CFLAGS) -Wl,-r -nostdlib
>>> > >> >>> >
>>> > >> >>> >  # Do not link against libraries which are part of the Generic Image
>>> > >> >>> > diff --git a/modules/libcom/RTEMS/Makefile b/modules/libcom/RTEMS/Makefile
>>> > >> >>> > index b46889db1..cb1a63b97 100644
>>> > >> >>> > --- a/modules/libcom/RTEMS/Makefile
>>> > >> >>> > +++ b/modules/libcom/RTEMS/Makefile
>>> > >> >>> > @@ -11,6 +11,9 @@ TOP = ../../..
>>> > >> >>> >  include $(TOP)/configure/CONFIG
>>> > >> >>> >  include $(TOP)/configure/CONFIG_LIBCOM_VERSION
>>> > >> >>> >
>>> > >> >>> > +#for checking
>>> > >> >>> > +SRC_DIRS += ../$(OS_API)
>>> > >> >>> > +
>>> > >> >>> >  PERL_SCRIPTS += epicsMakeMemFs.pl
>>> > >> >>> >
>>> > >> >>> >  INC += epicsRtemsInitHooks.h
>>> > >> >>> > (END)
>>> > >> >>> >
>>> > >> >>> > I will start with further changes tomorrow. Please find the changes pushed
>>> > >> >>> > here: https://github.com/epics-base/epics-base/compare/7.0...mritunjaysharma394:GSoC_pc-386
>>> > >> >>> >
>>> > >> >>> > I will be pleased to have the feedback and if I am on the correct course now.
>>> > >> >>> >
>>> > >> >>> > I will also like to inform that I have filled the GSoC Phase 1 Evaluation form and I
>>> > >> >>> > will request all my mentors to please feel free to fill the form before the deadline
>>> > >> >>> > and I hope that from now I will not disappoint with my progress.
>>> > >> >>> >
>>> > >> >>> > It is my bad that I still have not  been able to reach out to one more
>>> > >> >>> > mentor Pavel Pisa. Please if possible share the email id of Pavel and cc
>>> > >> >>> > Pavel in the replies to the email so that Pavel s aware of the progress and I
>>> > >> >>> > can apologise for my inability to connect with Pavel earlier.
>>> > >> >>> >
>>> > >> >>> > Thanks,
>>> > >> >>> > Mritunjay.
>>> > >> >>> >
>>> > >> >>> >
>>> > >> >>> >
>>> > >> >>> >
>>> > >> >>> >
>>> > >> >>> >
>>> > >> >>>
>>>
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel


More information about the devel mailing list