Chicagoboss make error for lager - chicagoboss

I am porting my web application developed in Chicagoboss from my mac to ubuntu. But when I run make on ubuntu I get the following error:
ERROR: pre_compile failed while processing /home/myname/myapp_priv: {'EXIT',{undef,[{lager,start,[],[]},
{boss_rebar,compile,4,
[{file,"../ChicagoBoss-0.8.12/priv/rebar/boss_rebar.erl"},
{line,97}]},
{boss_plugin,pre_compile,2,
[{file,"priv/rebar/boss_plugin.erl"},{line,105}]},
{rebar_core,run_modules,4,[]},
{rebar_core,execute,5,[]},
{rebar_core,process_dir1,6,[]},
{rebar_core,process_commands,2,[]},
{rebar,main,1,[]}]}}
make: *** [all] Error 1
Am I missing something? Thanking all in advance.

This error indicates, that lager parse transforms are not present while compiling. Lager does not define functions like lager:info or lager:error directly. During compilation, it changes those calls adding line number and other useful things.
Your problem can be usually solved by moving lager before any other dependency in ./deps/boss/rebar.config or adding it as a dependency directly to your application in ./rebar.config.

Related

React native build to device failed

I'm trying to build to an iOS device, building to simulator works fine.
This is what I get:
uncaught error Error: TypeError: unsupported file type at lookup (/Users/NAME/git/vex/vex-app react/VexAppReact/node_modules/image-size/lib/index.js:35:9)
at /Users/NAME/git/vex/vex-app-react/VexAppReact/node_modules/image-size/lib/index.js:93:22
at /Users/NAME/git/vex/vex-app-react/VexAppReact/node_modules/image-size/lib/index.js:50:9
at /Users/NAME/git/vex/vex-app-react/VexAppReact/node_modules/graceful-fs/graceful-fs.js:43:10
at FSReqWrap.oncomplete (fs.js:82:15)
See logs /var/folders/h8/42h3w_qd2r9fvpwy99jsnjq40000gn/T/react-packager.log
at SocketClient._handleMessage (SocketClient.js:144:23)
at BunserBuf. (SocketClient.js:53:42)
at emitOne (events.js:90:13)
at BunserBuf.emit (events.js:182:7)
at BunserBuf.process (/Users/NAME/git/vex/vex-app-react/VexAppReact/node_modules/bser/index.js:289:10)
at /Users/NAME/git/vex/vex-app react/VexAppReact/node_modules/bser/index.js:244:12
at nextTickCallbackWith0Args (node.js:452:9)
at process._tickCallback (node.js:381:13)
Command /bin/sh failed with exit code 1
I'm assuming there's something wrong with image assets. I didn't install the image-size node module myself, so I doubt there's something wrong with that module, it could be though.
Any suggestions welcome.
Solution: apparently you can't add png files to native ios build

Including lager in an erlang.mk project

I'm trying to add lager to a simple erlang.mk project. I understand lager uses parse transforms, so you have to set compile flags accordingly; so following advice from here:
Lager calls failing during Common Test test runs
my Makefile looks as follows:
PROJECT = hello_erlang_mk
DEPS = cowboy lager
# this must be first
include erlang.mk
# Compile flags
ERLC_COMPILE_OPTS= +'{parse_transform, lager_transform}'
# Append these settings
ERLC_OPTS += $(ERLC_COMPILE_OPTS)
TEST_ERLC_OPTS += $(ERLC_COMPILE_OPTS)
The release builds fine but somehow lager never seems to be included:
Eshell V5.10.4 (abort with ^G)
(hello_erlang_mk#127.0.0.1)1> lager:info("~s is ~s!", [lager, cool]).
** exception error: undefined function lager:info/2
Anyone have any pointers on how to get lager working within an erlang.mk project ?
[I'm using Erlang R16B03, Ubuntu 14.04]
Thanks.
I believe there is nothing to do with erlang.mk. The problem is -- you try to call lager:info from the shell. But actually there is no such function in the lager module. lager:info is just a command for parse transform that is unfolded to some other (more complex) constructions during compilation time.
If you want to check if you application contains lager, you can try from shell lager:status() for example (which is 'honest' function in the lager module). Or lager:module_info().
Forgive me. Noob error. application:start(lager). Sorry.

Error in installing the blackberry enterprise service 10 trial version

I am trying to install the BES 10(Blackberry enterprise service 10) in windows 7 os . I am stuck in SRP configuration. It Caught stuck in finalize initialization with the following error. Any idea to resolve them.
**<#01>[10000] (07/02 13:54:19.638):{0xDF8} CWebRequestWrapper::SubmitData: WinHttpQueryHeaders failing. Error code: 0. Status code: 405.
<#01>[10000] (07/02 13:54:19.638):{0xDF8} CRestApiWrapper::SetCertificateAttributes error sending data, result is [486003]
<#01>[10000] (07/02 13:54:19.638):{0xDF8} CDataContainer::DoApplyImpl: UbitexxCoreDataCon failed to apply. Result: 486023.
<#01>[10000] (07/02 13:54:19.638):{0xDF8} [CUbitexxCoreDataCon::Apply]: Failed to apply 'configuration.core.url.primary1' parameter.
<#02>[20000] (07/02 13:54:19.638):{0xDF8} CInstallStepSeq::PreApplyProcess: Errors encountered while applying Core Module. Core module may not be operational.**

Configuring Lager - I get this error: undefined parse transform 'lager_transform'

I'm testing this https://github.com/saleyn/erws_example on R16B03 (both on windows & Ubuntu)
==> erws_example (compile)
src/erws_handler.erl:none: undefined parse transform 'lager_transform'
ERROR: compile failed while processing /home/charles/erws_example: rebar_abort
I've seen this suggestion http://philipcristiano.com/2013/05/27/ordering-of-rebar-dependencies.html
So far, i'm unable to get any headway.
Thanks.
It seems rebar can not compile parse transforms before compiling everything else (https://github.com/basho/rebar/issues/270). The solution is to compile module with parse transform manually or use file-level parse_transform compiler directive instead of project level.
Try to put lager to first position in rebar dependency list. it will fix it. rebar ordering compile dependencies according to this list, not dependency tree))

compiling a program on InstantContiki2.6 micaz

I'm trying to compile a simple program (program.c) on micaz mote.
compile commands : make hello-world.elf TARGET=micaz
I have this message error :
make: *** no rule to make target 'program.elf'. stop
Process returned error code 2
I'm using InstantContiki2.6.1
Does someone know how to fix the problem ?
PS: I compile exemple programs in the exemple directory successfully.
Probably the problem is in your Makefile. It seems that the "CONTIKI" variable in the Makefile is not correct. Try to set CONTIKI=/home/user/contiki2.6 or CONTIKI=/home/user/contiki

Resources