I've successfully compiled cfengine 3.4.0a2 on OpenBSD 5.1 (amd64) but when I try to run cf-agent it core dumps:
I compiled like this: env LDFLAGS=-L/usr/local/lib ./configure --without-mysql --without-postgresql cf-promise -v runs ok: hostname:/var/cfengine$ sudo bin/cf-promises -v .... cf3> Interface 7: iwn0 cf3> Interface 8: iwn0 cf3> Interface 9: iwn0 cf3> Interface 10: enc0 cf3> Interface 11: pflog0 cf3> Trying to locate my IPv6 address cf3> Looking for environment from cf-monitord... cf3> Unable to detect environment from cf-monitord cf3> Unable to find proc/cpu data cf3> *********************************************************** cf3> Loading persistent classes cf3> *********************************************************** cf3> *********************************************************** cf3> Loaded persistent memory cf3> *********************************************************** cf3> -> No policy server (hub) watch yet registered cf3> There is no readable input file at promises.cf cf3> !!! System reports error for stat: "No such file or directory" cf3> cf-agent was not able to get confirmation of promises from cf-promises, so going to failsafe cf3> > Parsing file /var/cfengine/inputs/failsafe.cf cf3> Initiate variable convergence... cf3> Initiate variable convergence... cf3> -> Defined classes = { 172_16_1_73 64_bit Day29 Evening GMT_Hr20 Hr23 Hr23_Q4 Lcycle_2 Min45_50 Min48 Q4 Saturday September Yr2012 albourne_com amd64 any cfengine cfengine_3 cfengine_3_4 cfengine_3_4_0a2 com common community_edition compiled_on_openbsd5_1 ipv4_172 ipv4_172_16 ipv4_172_16_1 ipv4_172_16_1_73 localhost mac_unknown net_iface_em0 net_iface_enc0 net_iface_iwn0 net_iface_lo0 net_iface_pflog0 openbsd openbsd_5_1 openbsd_amd64 openbsd_amd64_5_1 openbsd_amd64_5_1_GENERIC_MP_0 ops_albourne_com rhino rhino_ops_albourne_com verbose_mode } cf3> -> Negated Classes = { } cf3> Initiate variable convergence... cf3> -> Inputs are valid > but core dumps when I try it with -x hostname:/var/cfengine$ sudo bin/cf-promises -x ---------------------------------------------------------- Cfengine - Level 1 self-diagnostic ---------------------------------------------------------- -> Internal consistency done ---------------------------------------------------------- Cfengine - Level 2 self-diagnostic ---------------------------------------------------------- 1. Test variable scanning 2. Testing promise duplication and expansion Segmentation fault (core dumped) > here's how cf-agent is linked against: hostname:/var/cfengine$ sudo ldd bin/cf-agent bin/cf-agent: Start End Type Open Ref GrpRef Name 0000000000400000 000000000081b000 exe 1 0 0 bin/cf-agent 00000002019bc000 0000000201eee000 rlib 0 1 0 /var/cfengine/lib/libpromises.so.1.0 000000020fdaa000 00000002101d2000 rlib 0 3 0 /usr/lib/libm.so.7.0 0000000207d59000 00000002081d2000 rlib 0 2 0 /usr/local/lib/libtokyocabinet.so.9.11.0 000000020ec19000 000000020f055000 rlib 0 2 0 /usr/local/lib/libpcre.so.2.5 000000020f80f000 000000020fdaa000 rlib 0 2 0 /usr/lib/libcrypto.so.20.1 0000000201580000 0000000201990000 rlib 0 3 0 /usr/lib/libpthread.so.15.1 0000000203741000 0000000203c27000 rlib 0 2 0 /usr/lib/libc.so.64.0 0000000202c3c000 000000020304c000 rlib 0 1 0 /usr/local/lib/libbz2.so.10.4 0000000203e44000 0000000204259000 rlib 0 1 0 /usr/lib/libz.so.4.1 000000020f400000 000000020f400000 rtld 0 1 0 /usr/libexec/ld.so >I opened up the core dump file with gdb and here's what it says: Reading symbols from /usr/lib/libz.so.4.1...done. Loaded symbols for /usr/lib/libz.so.4.1 Reading symbols from /usr/libexec/ld.so...done. Loaded symbols for /usr/libexec/ld.so #0 0x00000002011f87a2 in strlen (str=0x20ea09180 <Address 0x20ea09180 out of bounds>) at /usr/src/lib/libc/string/strlen.c:43 43 for (s = str; *s; ++s) (gdb) where #0 0x00000002011f87a2 in strlen (str=0x20ea09180 <Address 0x20ea09180 out of bounds>) at /usr/src/lib/libc/string/strlen.c:43 #1 0x000000020085dd39 in FileWriterWriteLen (writer=0x201ae1f20, str=0x20ea09180 <Address 0x20ea09180 out of bounds>, len_=2147483647) at writer.c:102 #2 0x000000020085df31 in WriterWriteLen (writer=0x201ae1f20, str=0x20ea09180 <Address 0x20ea09180 out of bounds>, len=2147483647) at writer.c:150 #3 0x000000020085df5d in WriterWrite (writer=0x201ae1f20, str=0x20ea09180 <Address 0x20ea09180 out of bounds>) at writer.c:158 #4 0x0000000200843299 in RvalPrint (writer=0x201ae1f20, rval={item = 0x207e8df30, rtype = 115 's'}) at rlist.c:1205 #5 0x000000020083fe85 in PrintVariablesInScope (writer=0x201ae1f20, scope=0x209e54140) at reporting.c:638 #6 0x0000000200840002 in ShowScopedVariablesText (writer=0x201ae1f20) at reporting.c:677 #7 0x00000002008400e6 in ShowScopedVariables (context=0x201ae1820, type=REPORT_OUTPUT_TYPE_TEXT) at reporting.c:711 #8 0x000000020082463f in ReadPromises (ag=cf_agent, agents=0x50ed23 "agent", config={bundlesequence = 0x0, verify_promises = true}, report_context=0x201ae1820) at generic_agent.c:448 #9 0x0000000200823e10 in GenericInitialize (agents=0x50ed23 "agent", config={bundlesequence = 0x0, verify_promises = true}, report_context=0x201ae1820) at generic_agent.c:226 #10 0x0000000000405ea1 in main (argc=5, argv=0x7f7ffffcecc8) at cf-agent.c:162 thanks Doros -- _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine