Thursday, May 01, 2014

 

openssl/evp.h , readline.h : No such file

Q: Building element_3.3.0 on a new system and getting:

make[2]: Entering directory `/home/jmir/Element/3.3.0/element_3.3.0/ref_platforms/generic_cluster_haf/output/callouts'
--- Compiling /home/jmir/Element/3.3.0/element_3.3.0/ref_platforms/generic_cluster_haf/../common/callouts/elem_stage_get_digest.c
/home/jmir/Element/3.3.0/element_3.3.0/ref_platforms/generic_cluster_haf/../common/callouts/elem_stage_get_digest.c:39:25: error: openssl/evp.h: No such file or directory


A: Missing packages for part of SSL.  For this one, on Ubuntu 10:

   sudo apt-get install libssl-dev

This will usually be followed by

   cli.c:24:31: error: readline/readline.h: No such file or directory

   sudo apt-get install libreadline-dev

Labels: , ,


Thursday, April 10, 2014

 

Ubuntu 12 build error : "cannot find -lexpat"

Q: How do I provision a brand-new Ubuntu 12.04 VM ? It appears to be missing some packages.

A: You will need the following, at a minimum, for Ubuntu 12 VMs:
(sudo apt-get install )

expat
libexpat1
libexpat-dev
elfutils (when missing gelf.h)
libelf-dev
openssl
libssl-dev (when missing evp.h)
openssh-server (updated to 1.0.1g for Heartbleed)

At some point you may run into this :

   echo " ERROR: Kernel configuration is invalid."; \
   echo " include/linux/autoconf.h or include/config/auto.conf are missing."; \
   echo " Run 'make oldconfig && make prepare' on kernel src to fix it."; \


For that you'll have to get kernel source tool libncurses5-dev, followed by "make menuconfig" down in /usr/src/linux-headers-...   Then you will need to copy the generated autoconf.h up a few levels. You also need (in older Element versions) an update to linx-2.5 to address the issue. 



Labels: ,


Friday, September 27, 2013

 

Updating LINX within an Element release

Q: I am on element_3.2.3 and want to upgrade the linx version to linx-2.5.1. I copied the linx tarball to the correct place and updated the LINX build version, but am getting this build error now:

make[5]: Entering directory `/element/3party/linx/linux-ppc_85xx/linx-2.5.1'
make[5]: *** No rule to make target `modules'. Stop.
make[5]: Leaving directory `/element/3party/linx/linux-ppc_85xx/linx-2.5.1'
make[4]: *** [/element/ref_platforms/generic_chassis/kernel/2.6.10_mvlcge401_ppc/linx.ko] Error 2

A: You're missing an important change that goes with this LINX upgrade - the top-level Makefile for 3party/linx needs to be updated also, due to some changes in the LINX distribution. 

Another change (which should be transparent to you if you only build linx via ref_platform) is that there is no Makefile delivered with the linx tarball itself.  If you need access to this Makefile for some reason, in 3party/linx/linx-2.5.1 run the "configure" script to generate it. 

The full steps to build with support for the newer-style LINX is:
 
1) update build/versions.mk VERSION_LINX
2) cp linx-2.5.1.tar.gz, updated Makefile and linx-2.5.1-001.patch into 3party/linx
3) rm –rf 3party/linx/linux_x86-64 (or whatever arch) objects
4) ref_platform, make clean here also
 

Labels: ,


Wednesday, July 24, 2013

 

Element ACTA build linker error: "corrupted double-linked list"

Q: I've tried to build a distribution for an ATCA chassis which uses openHPI. At the end stage of the build, when linking occurs the following linker error occurs:

 

*** Linking elemNtfLogger
*** glibc detected *** /usr/bin/ld: corrupted double-linked list: 0x00000000021464e0 ***
======= Backtrace: =========
/lib64/libc.so.6[0x33b0a760e6]
/lib64/libc.so.6[0x33b0a7656d]
/lib64/libc.so.6[0x33b0a79385]
/lib64/libc.so.6(__libc_malloc+0x71)[0x33b0a7a911]
/usr/lib64/libbfd-2.20.51.0.2-5.36.el6.so(objalloc_create+0x1d)[0x33b0eaf72d]
/usr/lib64/libbfd-2.20.51.0.2-5.36.el6.so(_bfd_new_bfd+0x2d)[0x33b0e3447d]
/usr/lib64/libbfd-2.20.51.0.2-5.36.el6.so(bfd_fopen+0x2e)[0x33b0e347ee]
/usr/bin/ld[0x41c7f1]
/usr/bin/ld[0x41ccf6]
/usr/bin/ld[0x41ce71] 



A: This is a known issue that occurs very infrequently, and only with certain GCC toolchains, e.g. it was seen with Red Hat gcc 4.4.7, and MV CGE 5 gcc 4.2.0 for PPC. The non-obvious root cause is that building with --cref causes issues for some GNU linkers. To work around this issue, in ELEMENT_ROOT/build/targets/ppc.mk (or whichever target applies), add the following:

     export CREF_WORKAROUND=yes

This will prevent Element from using the "--cref" switch when linking the executables.

Labels: , ,


Thursday, October 11, 2012

 

FATAL: Module linx already in kernel

Q: Upgrading to an element release running a newer version of LINX, but element can't seem to start due to this error:

FATAL: Module linx already in kernel.
FATAL ERROR: Failure (1) launching /usr/local/element/file_cache/element_3.2.2/bin/linux-x86_64/elemLinxMgr

 A: Certain systems expose a timing problem where LINX can be auto-loaded by other system components before the element LINX manager can deal with it. Thus element startup is hindered by the fact that it believes LINX is already loaded. To get around this, LINX can be made to use the older method of insmod/rmmod (which was used in prior LINX releases) - rather than he current method of modprobe/depmod - for loading/unloading LINX kernel. There is a patch available from support which takes care of this change also. (reference CR-719)

Labels: ,


Monday, September 10, 2012

 

confd build error: "cannot find -lconfd"

Q: I've set up the linked directory required for building a ref_platform that uses confd, and upgraded to a newer version of confd, but the build is failing : 
 
*** Linking elemConfdProxy
/usr/bin/ld: cannot find -lconfd
collect2: ld returned 1 exit status
make[3]: *** [/home/jmir/SystemManager/from_ipw/element_3.2.2/ref_platforms/generic_confd_3.5.0/bin/linux-x86_64/elemConfdProxy] Error 1

A: There is one more step, which isn't noted in the README.confd file. You must change the CONFD_VERSION reference in your local Makefile in ref_platforms/generic_confd_3.5.0 :

   ELEMENT_OPTIONS ?= CONFD_VERSION=36

This is because the Makefile variable overrides ones in the environment when you start building.

Labels: , ,


Tuesday, September 04, 2012

 

sysmgr_support.mk: No such file

 Q: Building element_3.2.2 for the first time from a tarball delivery, while making the generic_cluster reference platform I get this build error immediately:

make[1]: Entering directory `/home/jmir/Element/Releases/3.2.2/element_3.2.2/ref_platforms/generic_cluster'
/home/jmir/Element/Releases/3.2.2/element_3.2.2/ref_platforms/generic_cluster/../../build/packages/packages.mk:28: /home/jmir/Element/Releases/3.2.2/element_3.2.2/ref_platforms/generic_cluster/../../build/packages/sysmgr/sysmgr_support.mk: No such file or directory
make[1]: *** No rule to make target `/home/jmir/Element/Releases/3.2.2/element_3.2.2/ref_platforms/generic_cluster/../../build/packages/sysmgr/sysmgr_support.mk'.  Stop.
make[1]: Leaving directory `/home/jmir/Element/Releases/3.2.2/element_3.2.2/ref_platforms/generic_cluster'
make: *** [xml-check] Error 2

I don't even want to use sysmgr right now, so why is it complaining?

A: There was a packaging problem with 3.2.2 (that has since been corrected in subsequent releases); in order to work around it, assuming you don't need sysmgr, remove this line from build/packages/packages.mk :

include $(ELEMENT_PATH)/$(PACKAGE_DIR)/sysmgr/sysmgr_support.mk

Rebuild afterward and all should be well. If you do however need sysmgr, you'll need to get an updated tarball which includes it all.

Labels: , ,


Wednesday, August 03, 2011

 

Using double or float values in Element schemas


Q: I have a schema object type defined with a float value e.g.

loss1 instance="1:1" type="DOUBLE"

and set the object with a decimal value e.g. 8.5 . The object doesn't seem to return normal results in cases like an XML validation (CfgValidate) where it fails to validate the config. This config looks okay to me.

A: The reason it fails is due to a (not documented) restriction that floats and doubles in Element require IEEE-754 hex type formatting in their value field. E.g. if you invoke the type with a value of

loss1 type="DOUBLE"

followed by 4021000000000000, then the object will behave like a double valued object, be correctly validated, etc. Same applies to objects of type "FLOAT". There are many applets online that will convert a constant value for you, for example http://babbage.cs.qc.edu/IEEE-754/Decimal.html will convert it to 64-bit hexadecimal.

Labels: , , ,


Thursday, November 11, 2010

 

error: gelf.h: No such file or directory

Q: New system, first build, hitting a series of elf and ssl compile errors:

elem_stage_get_digest.c:36:18: error: gelf.h: No such file or directory
elem_stage_get_digest.c:37:20: error: libelf.h: No such file or directory
elem_stage_get_digest.c:39:25: error: openssl/evp.h: No such file or directory
make[5]: *** [obj/native-linux-x86/elem_stage_get_digest.o] Error 1


A: You need a few more packages. Become root.
For the elf errors,

$ yum install elfutils
$ yum install elfutils-libelf-devel

to verify:

$ ll /usr/include grep elf

You should see the elf ones now.

For the ssl package:

$ yum install openssl-devel-0.9.8e (can try g also)

to verify:

$ ll /usr/include grep ssl

You should now see openssl dir.

Labels: ,


 

expat.h: No such file or directory

Q: New system, first build, hitting this compile error for expat:

xml_utils.c:61:19: error: expat.h: No such file or directorymake[4]: *** [obj/native-linux-x86/xml_utils.o] Error 1

A: You're missing a few packages in your new system. Become root and add package expat-devel.
$ yum install expat-devel

To verify:
$ ll /usr/include/expat.h

Labels: ,


Monday, November 08, 2010

 

Build errors with kernels 2.6.27 and higher e.g. BUG_TRAP etc.

Q: Trying to build element 3.x for one of the newer linux kernels, e.g. FC9 is at 2.6.27. The build dies while building LINX. This wasn't a problem with the older kernel?

/home/jmir/SystemManager/Releases/3.1.0_2/3.1.0_sysmgr2/element_3.1.0_sysmgr2/3party/linx/linux-x86_64/linx-2.0.4/net/linx/af_linx.c: In function ‘linx_skb_store_bits’:/home/jmir/SystemManager/Releases/3.1.0_2/3.1.0_sysmgr2/element_3.1.0_sysmgr2/3party/linx/linux-x86_64/linx-2.0.4/net/linx/af_linx.c:1123: error: implicit declaration of function ‘BUG_TRAP’

A: There are several kernel changes in the newer kernels that impact LINX. These are fixed in linx-2.1.0.
- Download the tarball linx-2.1.0.tar.gz
- Place tarball into 3party/linx
- Change the build/versions.mk LINX_VERSION to point to the new release number

Labels: , ,


Wednesday, September 29, 2010

 

Build errors referring to glib and related includes

Q: Building element_3.2.1 with openhpi, and hitting this compile error:

In file included from
/home/jmir/Element/Releases/3.2.1/element_3.2.1/ref_platforms/generic_cluster/../../3party/openHPI/install/
linux-x86_64/include/openhpi/oh_utils.h:22,

from epi_cif.c:61:/home/jmir/Element/Releases/3.2.1/element_3.2.1/ref_platforms/generic_cluster/../../3party/openHPI/install/
linux-x86_64/include/openhpi/announcement_utils.h:25:18: error: glib.h: No such file or directory

make[3]: *** [obj/linux-x86_64/epi_cif.o] Error 1make[3]: Leaving directory `/home/jmir/Element/Releases/3.2.1/element_3.2.1/src/chassis_mgmt/epi'

I'm just building a generic_cluster reference, which shouldn't even require openhpi. And didn't see this problem in 3.2.0 either. What has changed?

A: If you have chassis managment installed, the build will attempt to build everything even for generic_cluster (unless you specifically disable this in the /build settings). More relevant, sometime between 3.2.0 and 3.2.1 the integrated version of openhpi (in this case from PPS) shifted its dependencies on glib. Even if you have glib installed, you will now need to add this to your C_INCLUDE_PATH environment variable. Verify that glib.h actually exists first, typically in /usr/include/glib-2.0 ; then add that specific directory to the C_INCLUDE_PATH environment, and rebuild.


Q: Did that, and the build gets further, but now bombs at another place in the same package:

+++ Compiling epi_cif.c
In file included from /usr/include/glib-2.0/glib/galloca.h:30,
from /usr/include/glib-2.0/glib.h:30,
from
/home/jmir/Element/Releases/3.2.1/element_3.2.1/ref_platforms/generic_cluster/../../3party/openHPI/install/
linux-x86_64/include/openhpi/announcement_utils.h:25,

from
/home/jmir/Element/Releases/3.2.1/element_3.2.1/ref_platforms/generic_cluster/../../3party/openHPI/install/
linux-x86_64/include/openhpi/oh_utils.h:22,

from epi_cif.c:61:/usr/include/glib-2.0/glib/gtypes.h:30:24: error: glibconfig.h: No such file or directory
/usr/include/glib-2.0/glib/gtypes.h:392:2:
error: #error unknown ENDIAN type
make[3]: *** [obj/linux-x86_64/epi_cif.o] Error 1
make[3]: Leaving directory `/home/jmir/Element/Releases/3.2.1/element_3.2.1/src/chassis_mgmt/epi'


A: Not done yet. Verify that /usr/lib64/glib-2.0/include/glibconfig.h exists. Then add this to C_INCLUDE_PATH as well, and repeat. These paths may be different on your distro (in this case its FC9).

Labels: , ,


Monday, September 13, 2010

 

Fedora build error - missing libltdl-devel

Q: Compiling Element 3.2.1 for an ATCA chassis on an FC9 system and got this build error:

checking for lt_dlopen in -lltdl... noconfigure: error: !************************************************************
- libltdl not found!
- this is required for plugin loading
- Try installing the libltdl-devel package
************************************************************
make[3]: *** [all] Error 1make[3]: Leaving directory /home/jmir/Element/Releases/3.2.1/element_3.2.1/3party/openHPI

I can build 3.2.0 and earlier without any problems. I also looked for the libltdl-devel package on yum but can't find it or anything similar.



A: The real package is called libtool-ltdl-devel. (Must have changed names somewhere along the way.) "yum install" on this package and all will be well.

Labels: , ,


Thursday, July 08, 2010

 

Element 3.x build missing stubs-32.h

Q: Trying to build Element 3.2.x for the first time, and hitting this compile error:

Making liblinx.a
In file included from /usr/include/features.h:359,
from /usr/include/assert.h:37,
from linx.c:31:
/usr/include/gnu/stubs.h:7:27: error: gnu/stubs-32.h: No such file or directory
make[5]: *** [lib] Error 1
make[5]: Leaving directory
/home/jmir/Element/Releases/3.2.0/element_3.2.0/3party/linx/linux-x86_64/linx-
2.2.2/liblinx


A: Google is your friend. Your 64-bit system was installed without (optional) 386 support. The LINX team decided a while ago that, on 64-bit hosts, liblinx.a shall be built in both 32- and 64-bit versions. So you are on the hook for 32-bit, if you don't want to change the way LINX builds. The easiest way to get through this is to add glibc for 386:

$ yum install glibc-devel.i386

A more complete explanation of the problem can be found at
http://linux.derkeiler.com/Mailing-Lists/Fedora/2008-06/msg02081.html

Q: I did that, but now get this error:

--- Building Element Libraries
make[2]: Entering directory `/home/jmir/Element/Releases/3.2.0/element_3.2.0'

make[3]: Entering directory `/home/jmir/Element/Releases/3.2.0/element_3.2.0/3party/linx'/bin/cp: cannot create regular file
`/home/jmir/Element/Releases/3.2.0/element_3.2.0/ref_platforms/generic_cluster/../../lib/linux-x86_64/liblinx.a':
No such file or directory

make[3]: *** [/home/jmir/Element/Releases/3.2.0/element_3.2.0/ref_platforms/generic_cluster/../../lib/linux-
x86_64/liblinx.a] Error 1


A: This time, google is not your friend. The "native-linux-x86_64" object directories are normal and desired in this case, but the compile error is somewhat misleading. After adding 32-bit support you should "make clean" and start over.

Labels: , ,


Wednesday, April 29, 2009

 

Getting confd.h compile error - but i'm not using confd (!)

Q: Why do I get this compile error when building generic_cluster in Element 2.3.3? It complains about confd, but i'm not even using confd.

make[3]: Entering directory `/home/jmir/Element/Releases/2.3.3/element_2.3.3/src/northbound/confd_proxy'
Makefile:42: 27
Makefile:43: -DCONFD_VERSION=27
+++ Compiling confd_proxy.c
confd_proxy.c:79:19: confd.h: No such file or directory
make[3]: *** [obj/linux-x86_64/confd_proxy.o] Error 1
make[3]: Leaving directory `/home/jmir/Element/Releases/2.3.3/element_2.3.3/src/northbound/confd_proxy'
make[2]: *** [libs] Error 1
make[2]: Leaving directory `/home/jmir/Element/Releases/2.3.3/element_2.3.3
make[1]: *** [elemlibs] Error 2
make[1]: Leaving directory `/home/jmir/Element/Releases/2.3.3/element_2.3.3/ref_platforms/generic_cluster'
make: *** [element-tree] Error 1


A: You - or someone else - probably did compile for a ref_platform that used confd earlier, on the same system. Dump your environment with "env" and see whether CONFD_VERSION is defined. If so, undefine it with "unset CONFD_VERSION" and the make should now proceed.

Labels: ,


Tuesday, April 14, 2009

 

Use of ElemAppInit in 3.0

Q: I'm using ElemAppInit in 3.0 - any known issues?

A: Here is a tip from Jim R:

Just an FYI – in Element 3.0 and later there is a problem if a component uses ElemAppInit instead of the ELEM_MAIN macro. The problem is with the long component names in the amf (saAppliction->Service Group->Component->blah blah blah). There are two ways around this: the easy way is to change the “Process Name Format” to comp in the AMF entry for you component – and make your component name match what you pass into ElemAppInit. Then there’s the right way – Dan S. provided this code fragment below that gets around this problem.

char *clientName;

/*
** Read the client name environmet variable. There will always be one if the Element loader
** is starting the application
*/

if (clientName == NULL)
{
/* No environment variable is present start using app name and hope its unique*/
status = ElemAppInit(pEnv->Name);
H_ASSERT_M(status == ELEM_STATUS_OK);
}
else
{
/* Initialize Element messaging interface and clientName is no longer valid*/
status = ElemAppInit(clientName);
H_ASSERT_M(status == ELEM_STATUS_OK);
}

In most cases this won’t be a problem because people will probably use ELEM_MAIN – but keep this in mind if they are using ElemAppInit.

Labels:


Friday, January 30, 2009

 

Compile error generic_confd reference : confd.h

Q: Trying to build the generic_confd_2.4.2 in Element 2.3.2, I have set up the CONFD_VERSION in the Makefile, and set up the link as directed in the ConfD Support manual:

+++ Compiling confd_proxy.c
confd_proxy.c:80:19: confd.h: No such file or directory

A: There is an additional directory you must add in your link between the element and confd build trees. (This is a minor document error with major implications.) You need a "confd" directory between the element and the linked directory.

The full path to your confd release from within element should look something like:
/home/jmir/Element/Releases/2.3.2/element_2.3.2/confd/confd-241

and the link therein should be similar to:
lrwxrwxrwx 1 jmir jmir 44 Jan 29 11:45 x86_64 -> /home/jmir/Tail-f/Releases/2.4.1/confd-2.4.1

Labels: ,


Wednesday, December 24, 2008

 

How do I look up status return errors? e.g. (status=1017)

Q: I saw this in the element.log:

n/a/modInfo Load/Start Request failed (status=1017)

What does it mean and how do I look up the error?


A: The "modInfo" is a program that you tried to load. The error can be found in the Fault Manager:
(fm_api_pri.h)

#define ELEM_FM_STATUS_LOADER_BASE ELEM_FM_STATUS_BASE + 1000
...
#define ELEM_FM_LOADER_APP_ALREADY_LOADED ELEM_FM_STATUS_LOADER_BASE + 17

There are also some codes in fm_mgmt_api_pri.h, but these are mostly private.

Labels:


Thursday, July 24, 2008

 

confd and Element support matrix

Q: I'm trying to figure out which version of confd goes with my Element release. This doesn't seem to be documented in the Element 2.3.x docs I have.

A: Correct that it's not documented. Here is the matrix for what is officially supported for confd.

Element 2.3.0 - confd 2.3.0
Element 2.3.1 - confd 2.3.0
Element 2.3.2 - confd 2.3.0, 2.3.1, 2.3.2,and 2.3.3 .
Element 3.0.0 - confd 2.3.0, 2.3.1, 2.3.2, 2.3.3, 2.4.0, 2.4.1, 2.4.2.

The 2.3.x and 2.4.x releases of ConfD are not API compatible, consequently Element starting in release 3.0.0 is built differently for each. There are two reference platforms for confd in the newer release, generic_confd_2.3.3 generic_confd_2.4.2 .

Labels: , ,


Tuesday, July 08, 2008

 

"error: too arguments to function 'confd_init' "

Q: When I put confd-2.4.1 into action with this release, I get this build error in generic_confd:

make[3]: Entering directory `/home/jmir/Element/Releases/2.3.0/element_2.3.0/src/northbound/confd_proxy'
+++ Compiling confd_proxy.c
confd_proxy.c: In function `elemConfdInitConfdHa':
confd_proxy.c:1101: warning: implicit declaration of function `confd_ha_init'
confd_proxy.c: In function `confdProxy':
confd_proxy.c:3067: error: too few arguments to function `confd_init'

A: confd-2.4.x is not supported with this release of Element. Go back to confd-2.3.0.

Q: ...and... if I want to use confd-2.4.x instead?

A: You must upgrade to Element 2.3.2 or higher.

Labels: , ,


This page is powered by Blogger. Isn't yours?

free web hit counter
free invisible web counter