'undefined reference to `json object update existing' error message while compiling asterisk?

Yesterday i was compiling asterisk, when i type make, asterisk some time later that error message was displayed
’undefined reference to `json object update existing’

How can i fix it?

You’re going to need to provide more information such as what you are building it on and the actual log message.

i have tried to compile asterisk again soon before. Again same error message.

[LD] abstract_jb.o acl.o adsi.o alaw.o aoc.o app.o ast_expr2.o ast_expr2f.o asterisk.o astfd.o astmm.o astobj2.o astobj2_container.o astobj2_hash.o astobj2_rbtree.o audiohook.o autochan.o autoservice.o backtrace.o bridge.o bridge_after.o bridge_basic.o bridge_channel.o bridge_roles.o bucket.o callerid.o ccss.o cdr.o cel.o channel.o channel_internal_api.o chanvars.o cli.o codec.o codec_builtin.o config.o config_options.o core_local.o core_unreal.o crypt.o data.o datastore.o db.o devicestate.o dial.o dns.o dnsmgr.o dsp.o endpoints.o enum.o event.o features.o features_config.o file.o fixedjitterbuf.o format.o format_cache.o format_cap.o format_compatibility.o frame.o framehook.o fskmodem.o global_datastores.o hashtab.o heap.o http.o image.o indications.o io.o jitterbuf.o json.o libasteriskpj.o loader.o lock.o logger.o manager.o manager_bridges.o manager_channels.o manager_endpoints.o manager_mwi.o manager_system.o max_forwards.o md5.o media_index.o message.o mixmonitor.o named_acl.o named_locks.o netsock.o netsock2.o optional_api.o parking.o pbx.o pbx_app.o pbx_builtins.o pbx_functions.o pbx_hangup_handler.o pbx_switch.o pbx_timing.o pbx_variables.o pickup.o plc.o poll.o presencestate.o privacy.o rtp_engine.o say.o sched.o sdp_srtp.o security_events.o sem.o sha1.o sip_api.o slinfactory.o smoother.o sorcery.o sounds_index.o srv.o stasis.o stasis_bridges.o stasis_cache.o stasis_cache_pattern.o stasis_channels.o stasis_endpoints.o stasis_message.o stasis_message_router.o stasis_system.o stdtime/localtime.o strcompat.o stringfields.o strings.o stun.o syslog.o taskprocessor.o tcptls.o tdd.o term.o test.o threadpool.o threadstorage.o timing.o translate.o udptl.o ulaw.o uri.o utils.o uuid.o version.o xml.o xmldoc.o -> asterisk
json.o: In function ast_json_object_update_existing': /usr/src/asterisk-13.13.1/main/json.c:579: undefined reference tojson_object_update_existing’
json.o: In function ast_json_object_update_missing': /usr/src/asterisk-13.13.1/main/json.c:606: undefined reference tojson_object_update_missing’
collect2: ld returned 1 exit status
make[1]: *** [asterisk] Error 1
make: *** [main] Error 2

What version of jansson do you have installed on your system? Is it possible you have multiple versions accidentally installed?

How to be sure that if i installed multiple versions?
how can i check this situation?

What Linux distribution are you using, and how did you install jansson in the first place?

it is ubuntu
Description: Ubuntu 12.04.5 LTS

i have a ubuntu image and may be it could be preinstalled jansson on that image. If it installed multiple times
second installation is: wget -O jansson.tar.gz https://github.com/akheron/jansson/archive/v2.7.tar.gz
How i reinstall older one?

It would be installed by the system using the “libjansson-dev” package. The underlying problem is that the headers the json_object_update_missing function being provided by jansson, but when building Asterisk the jansson it links against does not provide it. It could also be that the version you have installed removed that, Asterisk is only commonly used against 2.4 - I don’t know if anyone has tested against this 2.7 version you have used.

how can i check that is there any “libjansson-dev” package in my ubuntu image?

“dpkg -l | grep libjansson”

output of this command is:
ii libjansson-dev 2.2.1-1 C library for encoding, decoding and manipulating JSON data (dev)
ii libjansson4 2.2.1-1 C library for encoding, decoding and manipulating JSON data

So i think i must not install jansson again.

Indeed, you need to have one or the other. If you do install it manually it has to be installed the same way as the package, or else you’ll run into exactly what you ran into. A disagreement about what is installed.