I have not tried compiling/testing STAF on ARM processors (as I don't have 
any) so I don't know if any changes to STAF makefiles or other source code 
is needed to support STAF on ARM processors.

However, I did make one additional change to build/makefile.gcc  since I 
last provided the changes to compile STAF on Ubuntu to you.  Try this 
newer makefile.gcc file to see if it fixes the undefined reference errors 
you're seeing:



Note that this change is checked in to CVS on SourceForge. 

I had previously changed the order of $(OBJS) when assigning the 
CC_SHARED_LIB_IT variable in makefile.gcc.  I should not have changed the 
order of the linked libraries (as this caused issues on when linking on 
some other Unix platforms) so this assignment should look like: 

CC_SHARED_LIB_IT = $(CC_MK_SHARED_LIB) -o $@ $(CC_SHARED_LIB_LINKFLAGS) \
                   $(ALL_INCLUDEDIR_LIST) $(ALL_LIBDIR_LIST) 
$(ALL_LIB_LIST) \
                   $(OBJS)

Let me know if this resolves this issue.

--------------------------------------------------------------
Sharon Lucas
IBM Austin,   luc...@us.ibm.com
(512) 286-7313 or Tieline 363-7313




From:   Baibhav Kumar <baibhav.ku...@kpit.com>
To:     "staf-users@lists.sourceforge.net" 
<staf-users@lists.sourceforge.net>, 
Cc:     Nisha Parrakat <nisha.parra...@kpit.com>
Date:   05/05/2014 07:37 AM
Subject:        [staf-users] FW:  Error compiling STAF on Ubuntu 12.04



Hi,

With reference to the below mail we could sucesfully compile STAF on the 
ubuntu machine. But, We need to cross compile STAF for our target board, 
We have linux operating syatem and ARM processor.

Do you support ARM Processor for STAF, If yes what are the changes need to 
be done in source code or the makefile.

I tried cross compiling and the error that am getting is error of 
undefined refrence to many varibles. I am pasting some error logs for your 
refrence:

/home/baibhav/sarmistha/cross/src/staf/codepage/ucm2bin.cpp:31: undefined 
reference to `std::basic_ostream<char, std::char_traits<char> >& 
std::operator<< <std::char_traits<char> >(std::basic_ostream<char, 
std::char_traits<char> >&, char const*)'
/home/baibhav/sarmistha/cross/src/staf/codepage/ucm2bin.cpp:31: undefined 
reference to `std::basic_ostream<char, std::char_traits<char> 
>::operator<<(std::basic_ostream<char, std::char_traits<char> >& 
(*)(std::basic_ostream<char, std::char_traits<char> >&))'
/home/baibhav/sarmistha/cross/src/staf/codepage/ucm2bin.cpp:46: undefined 
reference to `std::basic_ostream<char, std::char_traits<char> >& 
std::operator<< <std::char_traits<char> >(std::basic_ostream<char, 
std::char_traits<char> >&, char const*)'
/home/baibhav/sarmistha/cross/src/staf/codepage/ucm2bin.cpp:46: undefined 
reference to `std::basic_ostream<char, std::char_traits<char> >& 
std::operator<< <std::char_traits<char> >(std::basic_ostream<char, 
std::char_traits<char> >&, char const*)'
.
.
.
.

/home/baibhav/sarmistha/cross/rel/linux/staf/debug/lib/libSTAF.so: 
undefined reference to `vtable for __cxxabiv1::__class_type_info'
/home/baibhav/sarmistha/cross/rel/linux/staf/debug/lib/libSTAF.so: 
undefined reference to `std::basic_string<char, std::char_traits<char>, 
std::allocator<char> >::data() const'
/home/baibhav/sarmistha/cross/rel/linux/staf/debug/lib/libSTAF.so: 
undefined reference to `std::basic_ostream<char, std::char_traits<char> 
>::operator<<(int)'
/home/baibhav/sarmistha/cross/rel/linux/staf/debug/lib/libSTAF.so: 
undefined reference to `std::basic_ios<char, std::char_traits<char> 
>::eof() const'
/home/baibhav/sarmistha/cross/rel/linux/staf/debug/lib/libSTAF.so: 
undefined reference to `std::_Rb_tree_insert_and_rebalance(bool, 
std::_Rb_tree_node_base*, std::_Rb_tree_node_base*, 
std::_Rb_tree_node_base&)'
/home/baibhav/sarmistha/cross/rel/linux/staf/debug/lib/libSTAF.so: 
undefined reference to `std::basic_ostream<char, std::char_traits<char> 
>::operator<<(unsigned long)'
/home/baibhav/sarmistha/cross/rel/linux/staf/debug/lib/libSTAF.so: 
undefined reference to `std::__throw_bad_alloc()'
/home/baibhav/sarmistha/cross/rel/linux/staf/debug/lib/libSTAF.so: 
undefined reference to `std::allocator<char>::~allocator()'
/home/baibhav/sarmistha/cross/rel/linux/staf/debug/lib/libSTAF.so: 
undefined reference to `__cxa_guard_acquire'
collect2: ld returned 1 exit status
make: *** 
[/home/baibhav/sarmistha/cross/obj/linux/staf/debug/codepage/ucm2bin] 
Error 1


Awating reply!!

Regards,
Baibhav Kumar


From: Sharon Lucas <luc...@us.ibm.com>
Sent: 10 April 2014 03:05
To: Nisha Parrakat; Sarmistha Mahapatra
Cc: staf-users@lists.sourceforge.net
Subject: RE: [staf-users] Error compiling STAF on Ubuntu 12.04 
 
Good news.  I have a fix for the problem compiling STAF on Linux Ubuntu 
systems that use later gcc versions. It appears that gcc's linker provided 
with later versions of Ubuntu requires that you put the libraries you are 
linking after the object files in the g++ link command.  I found this when 
googling for this problem, 

I made a couple of changes to STAF makefiles to put the STAF libraries 
being linked after the STAF objects in the g++ link commands and now the 
STAF core components are compiling on my Ubuntu machine.  So, that 
explains why building STAF works on our Linux SLES machines but not on 
your Ubuntu machine as the gcc provided by SLES does not have this 
requirement.  I'll open a STAF bug and check in these makefile changes for 
the next version of STAF after I verify that it doesn't break anything 
when building STAF on other Unix operating systems that use gcc. 

Here's a diff of the STAF makefile code changes I made to fix this problem 
in case you want to try them out before I check in these changes: 

$ cvs diff makefile build/makefile.gcc 
Index: makefile 
=================================================================== 
RCS file: /cvsroot/staf/src/staf/makefile,v 
retrieving revision 1.22 
diff -r1.22 makefile 
616c616 
< ALL_LIB_LIST_RAW ?= $(CC_LIBS) $(OS_LIBS) $(LIBS) 
--- 
> ALL_LIB_LIST_RAW ?= $(CC_LIBS) $(LIBS) $(OS_LIBS) 
Index: build/makefile.gcc 
=================================================================== 
RCS file: /cvsroot/staf/src/staf/build/makefile.gcc,v 
retrieving revision 1.17 
diff -r1.17 makefile.gcc 
87c87 
<                    $(ALL_LIBDIR_LIST) $(ALL_LIB_LIST) $(OBJS) 
--- 
>                    $(ALL_LIBDIR_LIST) $(OBJS) $(ALL_LIB_LIST) 
90,91c90 
<                    $(ALL_INCLUDEDIR_LIST) $(ALL_LIBDIR_LIST) 
$(ALL_LIB_LIST) 
<                    $(OBJS) 
--- 
>                    $(ALL_INCLUDEDIR_LIST) $(ALL_LIBDIR_LIST) $(OBJS) 
$(ALL_LI_LIST)




--------------------------------------------------------------
Sharon Lucas
IBM Austin,   luc...@us.ibm.com
(512) 286-7313 or Tieline 363-7313




From:        Sarmistha Mahapatra <sarmistha.mahapa...@kpit.com> 
To:        Sharon Lucas/Austin/IBM@IBMUS, 
Date:        04/08/2014 11:34 PM 
Subject:        RE: [staf-users] Error compiling STAF on Ubuntu 12.04 



Hi, 
    We are trying to cross compile STAF for Linux ARM(imax536) processor. 
Is  it compatible for ARM. 
  
  
Regards, 
Sarmistha 
  
From: Sharon Lucas [mailto:luc...@us.ibm.com] 
Sent: 09 April 2014 00:16
To: Nisha Parrakat
Cc: staf-users@lists.sourceforge.net
Subject: Re: [staf-users] Error compiling STAF on Ubuntu 12.04 
  
Is the machine that you're trying to compile STAF on a x86 (32-bit) 
architecture Linux Ubuntu system?  If not, what architecture is it? 

What version of gcc/g++ are you using?  As noted in that posting, we 
haven't compiled STAF using the latest versions of gcc/g++ so it is 
possible that there may be some STAF source code changes needed STAF to 
support latest gcc compiler changes (as new GCC versions may introduce 
incompatibilities) or possibly a small change to a STAF build file like 
staf/build/makefile.gcc.  We use gcc 4.1.2 or earlier on our Linux build 
systems, though we would like to support later GCC versions.  Let me know 
if you find out how to resolve this issue (and if I do I'll post here). 

Is it possible to try using an earlier version of gcc on your system to 
compile STAF?  Otherwise, need to look at what changes have been in gcc / 
ld to see if changes need to be made to STAF source code.  For example, 
the following links talk about changes in later GCC versions: 
Updates in the 4.2 Series: http://gcc.gnu.org/gcc-4.2/changes.html 
Updates in the 4.3 Series: http://gcc.gnu.org/gcc-4.3/changes.html 
Updates in the 4.4 Series: http://gcc.gnu.org/gcc-4.4/changes.html 

Also, the GCC porting guides may be useful.  For example:
- http://gcc.gnu.org/gcc-4.3/porting_to.html
--------------------------------------------------------------
Sharon Lucas
IBM Austin,   luc...@us.ibm.com
(512) 286-7313 or Tieline 363-7313



From:        Nisha Parrakat <nisha.parra...@kpit.com> 
To:        "staf-users@lists.sourceforge.net" <
staf-users@lists.sourceforge.net>, 
Date:        04/08/2014 02:08 AM 
Subject:        [staf-users] Error compiling STAF on Ubuntu 12.04 





Hi,

I have a similar query as posted (about an year ago)in the link below
http://sourceforge.net/p/staf/discussion/104045/thread/5d554cb4/#15a3

I am trying to compile staf on ubuntu 12.04 . I have set up the following 
environment variables
as below

export STAF_USE_SSL=
export PROJECTS="staf"
export OS_NAME=linux
export BUILD_TYPE=debug
export STAF_USE_IPV6=
export CC_NAME=gcc


I get the following errors :-

/home/nishap/staf/obj/linux/staf/debug/serviceproxies/execproxy/STAFExecProxy.o:
 
In function `main':
/home/nishap/staf/src/staf/serviceproxies/execproxy/STAFExecProxy.cpp:57: 
undefined reference to `STAFEventSem::STAFEventSem(char const*)'


and many more.

Please help.  We need to compile this on host and then try cross 
compilation.
We are unable to cross compile Staf also which we want to do so that we 
can run the same on the
target for tests.



Regards,
Ms Nisha Parrakat
KPIT Technologies Ltd, Pune, INDIA

This message contains information that may be privileged or confidential 
and is the property of the KPIT Technologies Ltd. It is intended only for 
the person to whom it is addressed. If you are not the intended recipient, 
you are not authorized to read, print, retain copy, disseminate, 
distribute, or use this message or any part thereof. If you receive this 
message in error, please notify the sender immediately and delete all 
copies of this message. KPIT Technologies Ltd. does not accept any 
liability for virus infected mails.

------------------------------------------------------------------------------
Put Bad Developers to Shame
Dominate Development with Jenkins Continuous Integration
Continuously Automate Build, Test & Deployment 
Start a new project now. Try Jenkins in the cloud.
http://p.sf.net/sfu/13600_Cloudbees
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users
This message contains information that may be privileged or confidential 
and is the property of the KPIT Technologies Ltd. It is intended only for 
the person to whom it is addressed. If you are not the intended recipient, 
you are not authorized to read, print, retain copy, disseminate, 
distribute, or use this message or any part thereof. If you receive this 
message in error, please notify the sender immediately and delete all 
copies of this message. KPIT Technologies Ltd. does not accept any 
liability for virus infected mails. 
This message contains information that may be privileged or confidential 
and is the property of the KPIT Technologies Ltd. It is intended only for 
the person to whom it is addressed. If you are not the intended recipient, 
you are not authorized to read, print, retain copy, disseminate, 
distribute, or use this message or any part thereof. If you receive this 
message in error, please notify the sender immediately and delete all 
copies of this message. KPIT Technologies Ltd. does not accept any 
liability for virus infected mails. 
------------------------------------------------------------------------------
Is your legacy SCM system holding you back? Join Perforce May 7 to find 
out:
&#149; 3 signs your SCM is hindering your productivity
&#149; Requirements for releasing software faster
&#149; Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users

Attachment: makefile.gcc
Description: Binary data

------------------------------------------------------------------------------
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
&#149; 3 signs your SCM is hindering your productivity
&#149; Requirements for releasing software faster
&#149; Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users

Reply via email to