I'm using TensorFlow with Julia, but I can't use TensorFlow with my IDE Atom because it crash Julia.
The problem does not come from TensorFlow because it works in the terminal...
Here is the code that makes the editor crash:
julia> ENV["CUDA_VISIBLE_DEVICES"] = "0" # To use my GPU
"0"
julia> using TensorFlow
julia> sess = Session()
The exit error is the following:
signal (11): Erreur de segmentation
while loading no file, in expression starting on line 0
unknown function (ip: 0x7f33aa7aec7f)
emit_invoke at /buildworker/worker/package_linux64/build/src/codegen.cpp:3400 [inlined]
emit_expr at /buildworker/worker/package_linux64/build/src/codegen.cpp:4135
emit_function at /buildworker/worker/package_linux64/build/src/codegen.cpp:6101
jl_compile_linfo at /buildworker/worker/package_linux64/build/src/codegen.cpp:1256
emit_invoke at /buildworker/worker/package_linux64/build/src/codegen.cpp:3400 [inlined]
emit_expr at /buildworker/worker/package_linux64/build/src/codegen.cpp:4135
emit_assignment at /buildworker/worker/package_linux64/build/src/codegen.cpp:3759 [inlined]
emit_expr at /buildworker/worker/package_linux64/build/src/codegen.cpp:4159
emit_stmtpos at /buildworker/worker/package_linux64/build/src/codegen.cpp:4064 [inlined]
emit_function at /buildworker/worker/package_linux64/build/src/codegen.cpp:6248
jl_compile_linfo at /buildworker/worker/package_linux64/build/src/codegen.cpp:1256
jl_compile_for_dispatch at /buildworker/worker/package_linux64/build/src/gf.c:1668
jl_compile_method_internal at /buildworker/worker/package_linux64/build/src/julia_internal.h:307 [inlined]
jl_call_method_internal at /buildworker/worker/package_linux64/build/src/julia_internal.h:354 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:1926
#call#45 at /home/jabou/.julia/v0.6/TensorFlow/src/core.jl:569
unknown function (ip: 0x7f33880acf21)
jl_call_fptr_internal at /buildworker/worker/package_linux64/build/src/julia_internal.h:339 [inlined]
jl_call_method_internal at /buildworker/worker/package_linux64/build/src/julia_internal.h:358 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:1926
Type at /home/jabou/.julia/v0.6/TensorFlow/src/core.jl:563
jl_call_fptr_internal at /buildworker/worker/package_linux64/build/src/julia_internal.h:339 [inlined]
jl_call_method_internal at /buildworker/worker/package_linux64/build/src/julia_internal.h:358 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:1926
do_call at /buildworker/worker/package_linux64/build/src/interpreter.c:75
eval at /buildworker/worker/package_linux64/build/src/interpreter.c:242
eval_body at /buildworker/worker/package_linux64/build/src/interpreter.c:543
jl_interpret_toplevel_thunk at /buildworker/worker/package_linux64/build/src/interpreter.c:692
jl_toplevel_eval_flex at /buildworker/worker/package_linux64/build/src/toplevel.c:592
jl_toplevel_eval_in at /buildworker/worker/package_linux64/build/src/builtins.c:496
eval at ./boot.jl:235
unknown function (ip: 0x7f33a6bf0d2f)
jl_call_fptr_internal at /buildworker/worker/package_linux64/build/src/julia_internal.h:339 [inlined]
jl_call_method_internal at /buildworker/worker/package_linux64/build/src/julia_internal.h:358 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:1926
eval at ./boot.jl:234
unknown function (ip: 0x7f33a6d31a0b)
jl_call_fptr_internal at /buildworker/worker/package_linux64/build/src/julia_internal.h:339 [inlined]
jl_call_method_internal at /buildworker/worker/package_linux64/build/src/julia_internal.h:358 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:1926
do_call at /buildworker/worker/package_linux64/build/src/interpreter.c:75
eval at /buildworker/worker/package_linux64/build/src/interpreter.c:242
eval_body at /buildworker/worker/package_linux64/build/src/interpreter.c:543
jl_interpret_toplevel_thunk at /buildworker/worker/package_linux64/build/src/interpreter.c:692
jl_toplevel_eval_flex at /buildworker/worker/package_linux64/build/src/toplevel.c:592
jl_toplevel_eval_in at /buildworker/worker/package_linux64/build/src/builtins.c:496
macro expansion at /home/jabou/.julia/v0.6/Atom/src/repl.jl:118 [inlined]
anonymous at ./<missing> (unknown line)
jl_call_fptr_internal at /buildworker/worker/package_linux64/build/src/julia_internal.h:339 [inlined]
jl_call_method_internal at /buildworker/worker/package_linux64/build/src/julia_internal.h:358 [inlined]
jl_toplevel_eval_flex at /buildworker/worker/package_linux64/build/src/toplevel.c:589
jl_toplevel_eval_in at /buildworker/worker/package_linux64/build/src/builtins.c:496
eval at ./boot.jl:235
unknown function (ip: 0x7f33a6bf0d2f)
jl_call_fptr_internal at /buildworker/worker/package_linux64/build/src/julia_internal.h:339 [inlined]
jl_call_method_internal at /buildworker/worker/package_linux64/build/src/julia_internal.h:358 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:1926
eval_user_input at ./REPL.jl:66
unknown function (ip: 0x7f33a6c7218f)
jl_call_fptr_internal at /buildworker/worker/package_linux64/build/src/julia_internal.h:339 [inlined]
jl_call_method_internal at /buildworker/worker/package_linux64/build/src/julia_internal.h:358 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:1926
macro expansion at ./REPL.jl:97 [inlined]
#1 at ./event.jl:73
unknown function (ip: 0x7f338803f50f)
jl_call_fptr_internal at /buildworker/worker/package_linux64/build/src/julia_internal.h:339 [inlined]
jl_call_method_internal at /buildworker/worker/package_linux64/build/src/julia_internal.h:358 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:1926
jl_apply at /buildworker/worker/package_linux64/build/src/julia.h:1424 [inlined]
start_task at /buildworker/worker/package_linux64/build/src/task.c:267
unknown function (ip: 0xffffffffffffffff)
Allocations: 16440349 (Pool: 16435720; Big: 4629); GC: 37
Julia has exited. Press Enter to start a new session.
Thank you for your help...
EDIT
It works now, I just copied on my desk, then deleted the TensorFlow package from Julia. After I copied the package from my desk to Julia (I didn't change it)...
Related
This is my project: https://github.com/dade1987/StockPricePrediction
I deployed it in Heroku but i can't see my homepage on this link: https://price-predictor-eu.herokuapp.com/
I see it locally.
Heroku says:
2020-06-27T10:33:17.545687+00:00 heroku[router]: at=error code=H12 desc="Request timeout" method=GET path="/" host=price-predictor-eu.herokuapp.com request_id=be6efc89-ba70-4ba8-bb4e-26b85ccce869 fwd="151.36.107.145" dyno=web.1 connect=0ms service=30000ms status=503 bytes=0 protocol=https
I tried to do it too:
webpack-dev-server route
✖ 「wdm」: Hash: 6575b1f5bc373f461724
Version: webpack 4.28.4
Time: 5599ms
Built at: 06/27/2020 2:53:13 PM
1 asset
Entrypoint main = bundle.js
[0] (webpack)-dev-server/client/clients/SockJSClient.js 4.06 KiB {0} [built]
[2] (webpack)-dev-server/client/utils/log.js 964 bytes {0} [built]
[3] multi (webpack)-dev-server/client?http://0.0.0.0:8080 route 40 bytes {0} [built]
[4] (webpack)-dev-server/client?http://0.0.0.0:8080 4.29 KiB {0} [built]
[5] ./node_modules/strip-ansi/index.js 161 bytes {0} [built]
[6] ./node_modules/ansi-regex/index.js 135 bytes {0} [built]
[7] (webpack)-dev-server/client/socket.js 1.53 KiB {0} [built]
[10] (webpack)-dev-server/client/overlay.js 3.51 KiB {0} [built]
[11] ./node_modules/ansi-html/index.js 4.16 KiB {0} [built]
[12] ./node_modules/html-entities/lib/index.js 449 bytes {0} [built]
[16] ./node_modules/loglevel/lib/loglevel.js 8.41 KiB {0} [built]
[17] (webpack)-dev-server/client/utils/sendMessage.js 402 bytes {0} [built]
[18] (webpack)-dev-server/client/utils/reloadApp.js 1.59 KiB {0} [built]
[21] (webpack)-dev-server/client/utils/createSocketUrl.js 2.91 KiB {0} [built]
[30] (webpack)/hot sync nonrecursive ^\.\/log$ 170 bytes {0} [built]
+ 17 hidden modules
ERROR in Entry module not found: Error: Can't resolve 'route' in '/app'
ERROR in multi (webpack)-dev-server/client?http://0.0.0.0:8080 route
Module not found: Error: Can't resolve 'route' in '/app'
# multi (webpack)-dev-server/client?http://0.0.0.0:8080 route main[1]
Where is my error? I am not very expert in node.
Thank you
Julia 1.3.1 works fine in my ubuntu 18.04 platform:
Linux KenServ 5.3.0-45-generic #37~18.04.1-Ubuntu SMP Fri Mar 27 15:58:10 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
But when I download and try to run julia 1.4.1 it fails and show me this messages:
Invalid instruction at 0x7faf524e39f8: 0x66, 0x0f, 0x3a, 0x0f, 0xc0, 0x08, 0x0f, 0x83, 0x61, 0x05, 0x00, 0x00, 0x48, 0xc1, 0xe0
signal (4): Instrucción ilegal
in expression starting at none:0
_ZN4llvm13LexicalScopes23assignInstructionRangesERNS_15SmallVectorImplISt4pairIPKNS_12MachineInstrES5_EEERNS_8DenseMapIS5_PNS_12LexicalScopeENS_12DenseMapInfoIS5_EENS_6detail12DenseMapPairIS5_SB_EEEE at /home/kenneth/Descargas/julia/julia-1.4.1/bin/../lib/julia/libLLVM-8jl.so (unknown line)
_ZN4llvm13LexicalScopes10initializeERKNS_15MachineFunctionE at /home/kenneth/Descargas/julia/julia-1.4.1/bin/../lib/julia/libLLVM-8jl.so (unknown line)
_ZN4llvm18LiveDebugVariables20runOnMachineFunctionERNS_15MachineFunctionE at /home/kenneth/Descargas/julia/julia-1.4.1/bin/../lib/julia/libLLVM-8jl.so (unknown line)
_ZN4llvm19MachineFunctionPass13runOnFunctionERNS_8FunctionE at /home/kenneth/Descargas/julia/julia-1.4.1/bin/../lib/julia/libLLVM-8jl.so (unknown line)
_ZN4llvm13FPPassManager13runOnFunctionERNS_8FunctionE at /home/kenneth/Descargas/julia/julia-1.4.1/bin/../lib/julia/libLLVM-8jl.so (unknown line)
_ZN4llvm13FPPassManager11runOnModuleERNS_6ModuleE at /home/kenneth/Descargas/julia/julia-1.4.1/bin/../lib/julia/libLLVM-8jl.so (unknown line)
_ZN4llvm6legacy15PassManagerImpl3runERNS_6ModuleE at /home/kenneth/Descargas/julia/julia-1.4.1/bin/../lib/julia/libLLVM-8jl.so (unknown line)
operator() at /buildworker/worker/package_linux64/build/src/jitlayers.cpp:356
addModule at /buildworker/worker/package_linux64/build/usr/include/llvm/ExecutionEngine/Orc/IRCompileLayer.h:84 [inlined]
addModule at /buildworker/worker/package_linux64/build/src/jitlayers.cpp:485
jl_add_to_ee at /buildworker/worker/package_linux64/build/src/jitlayers.cpp:747 [inlined]
jl_finalize_function at /buildworker/worker/package_linux64/build/src/jitlayers.cpp:755
getAddressForFunction at /buildworker/worker/package_linux64/build/src/codegen.cpp:1414
jl_generate_fptr at /buildworker/worker/package_linux64/build/src/codegen.cpp:1508
jl_compile_method_internal at /buildworker/worker/package_linux64/build/src/gf.c:1912
_jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2153 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2322
#764 at ./client.jl:370
jfptr_#764_8156 at /home/kenneth/Descargas/julia/julia-1.4.1/lib/julia/sys.so (unknown line)
_jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2144 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2322
jl_apply at /buildworker/worker/package_linux64/build/src/julia.h:1700 [inlined]
do_apply at /buildworker/worker/package_linux64/build/src/builtins.c:643
jl_f__apply_latest at /buildworker/worker/package_linux64/build/src/builtins.c:693
#invokelatest#1 at ./essentials.jl:712 [inlined]
invokelatest at ./essentials.jl:711 [inlined]
run_main_repl at ./client.jl:367
exec_options at ./client.jl:305
_start at ./client.jl:484
jfptr__start_2075 at /home/kenneth/Descargas/julia/julia-1.4.1/lib/julia/sys.so (unknown line)
_jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2144 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2322
jl_apply at /buildworker/worker/package_linux64/build/ui/../src/julia.h:1700 [inlined]
true_main at /buildworker/worker/package_linux64/build/ui/repl.c:96
main at /buildworker/worker/package_linux64/build/ui/repl.c:217
__libc_start_main at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
_start at ./julia (unknown line)
Allocations: 2505 (Pool: 2496; Big: 9); GC: 0
Instrucción ilegal (`core' generado)
I try to compile from source. The same thing happens.
Invalid instruction at 0x7fad3a976ad0: 0x66, 0x0f, 0x3a, 0x0f, 0xc0, 0x08, 0x0f, 0x83, 0xae, 0x04, 0x00, 0x00, 0x48, 0xc1, 0xe0
signal (4): Instrucción ilegal
Allocations: 1 (Pool: 1; Big: 0); GC: 0
Illegal instruction (core dumped)
*** This error might be fixed by running `make clean`. If the error persists, try `make cleanall`. ***
sysimage.mk:67: fallo en las instrucciones para el objetivo '/home/kenneth/Descargas/julia/julia-1.4.1/usr/lib/julia/sys.ji'
make[1]: *** [/home/kenneth/Descargas/julia/julia-1.4.1/usr/lib/julia/sys.ji] Error 1
Makefile:81: fallo en las instrucciones para el objetivo 'julia-sysimg-ji'
make: *** [julia-sysimg-ji] Error 2
Please help me, What am I doing wrong?
Hi everyone, I am trying to implement PACT JS. Currently I am referring to this implementation :
npm install (or yarn install) and the consumer side command (mocha app/client/spec/PostServiceClient.spec.js) worked well.The pact file was generated.
But the provider side command (node app/service/spec/PostService.spec.js) failed.It's seemed due to the localhost server. But i didn't succeed in running the server. It missed 'THREE' module.
After adding 'THREE' module, i couldn't compile the build. So 2 files are missing in the repository main.js and Template.html (--> webpack.config.js).
And i didn't succeed in posting a comment in Lucas M Blog (http://hecodes.com/2016/10/better-testing-microservices-using-consumer-driven-contracts-node-js/)
Could someone help me?
Wilson Mahann
Thanks a lot for your help
Error messages trying to run the server
$ yarn server
yarn run v1.9.4
$ webpack-dev-server --host 0.0.0.0 --config webpack.config.js --devtool eval --progress --hot --inline
module.js:550
throw err;
^
Error: Cannot find module 'three'
at Function.Module._resolveFilename (module.js:548:15)
at Function.resolve (internal/module.js:18:19)
at Object. (D:\Workspace\pact-js\js00\pact-node-example-master\webpack.config.js:34:31)
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
at Module.require (module.js:597:17)
at require (internal/module.js:11:18)
at module.exports (D:\Workspace\pact-js\js00\pact-node-example-master\node_modules\webpack\bin\convert-argv.js:80:13)
at Object. (D:\Workspace\pact-js\js00\pact-node-example-master\node_modules\webpack-dev-server\bin\webpack-dev-server.js:68:48)
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
So I had successfully the missing module "three" : yarn add three
And run the server
$ yarn server
yarn run v1.9.4
$ webpack-dev-server --host 0.0.0.0 --config webpack.config.js --devtool eval --progress --hot --inline
clean-webpack-plugin: D:\Workspace\pact-js\js00\pact-node-example-master\dist has been removed. 70% 1/1 build modules
http://0.0.0.0:8080/
webpack result is served from /
content is served from ./app 30% 1/3 build modulescontent is served from ./app 44% 4/7 build modulescontent is served from ./app 61% 6/7 build modulescontent is served from ./app 54% 12/16 build modulescontent is served from ./app 62% 15/17 build modulescontent is served from ./app 45% 16/27 build modulescontent is served from ./app 35% 19/44 build modulescontent is served from ./app 49% 29/44 build modulescontent is served from ./app 65% 42/45 build modulescontent is served from ./app 48% 44/69 build modulescontent is served from ./app 52% 49/69 build modulescontent is served from ./app 62% 60/69 build modulescontent is served from ./app 66% 67/71 build modulescontent is served from ./app 69% 75/76 build modulescontent is served from ./app Hash: 2948e04a9d9577c7951d
Version: webpack 1.15.0
Time: 569ms
Asset Size Chunks Chunk Names
bundle.2948e04a9d9577c7951d.js 285 kB 0 [emitted] app
index.html 2.27 kB [emitted]
chunk {0} bundle.2948e04a9d9577c7951d.js (app) 227 kB [rendered]
[0] multi app 52 bytes {0} [built] [1 error]
[1] (webpack)-dev-server/client?http://0.0.0.0:8080 4.16 kB {0} [built]
[2] ./~/url/url.js 23.3 kB {0} [built]
[3] ./~/url/~/punycode/punycode.js 14.6 kB {0} [built]
[4] (webpack)/buildin/module.js 251 bytes {0} [built]
[5] ./~/url/util.js 314 bytes {0} [built]
[6] ./~/querystring/index.js 127 bytes {0} [built]
[7] ./~/querystring/decode.js 2.4 kB {0} [built]
[8] ./~/querystring/encode.js 2.09 kB {0} [built]
[9] ./~/strip-ansi/index.js 161 bytes {0} [built]
[10] ./~/ansi-regex/index.js 135 bytes {0} [built]
[11] (webpack)-dev-server/client/socket.js 897 bytes {0} [built]
[12] ./~/sockjs-client/lib/entry.js 244 bytes {0} [built]
[13] ./~/sockjs-client/lib/transport-list.js 613 bytes {0} [built]
[14] ./~/sockjs-client/lib/transport/websocket.js 2.72 kB {0} [built]
[15] ./~/process/browser.js 5.42 kB {0} [built]
[16] ./~/sockjs-client/lib/utils/event.js 2 kB {0} [built]
[17] ./~/sockjs-client/lib/utils/random.js 746 bytes {0} [built]
[18] ./~/sockjs-client/lib/utils/browser-crypto.js 438 bytes {0} [built]
[19] ./~/sockjs-client/lib/utils/url.js 975 bytes {0} [built]
[20] ./~/url-parse/index.js 12 kB {0} [built]
[21] ./~/requires-port/index.js 753 bytes {0} [built]
[22] ./~/querystringify/index.js 1.58 kB {0} [built]
[23] ./~/debug/src/browser.js 4.73 kB {0} [built]
[24] ./~/debug/src/debug.js 4.39 kB {0} [built]
[25] ./~/ms/index.js 2.76 kB {0} [built]
[26] ./~/inherits/inherits_browser.js 672 bytes {0} [built]
[27] ./~/sockjs-client/lib/event/emitter.js 1.27 kB {0} [built]
[28] ./~/sockjs-client/lib/event/eventtarget.js 1.85 kB {0} [built]
[29] ./~/sockjs-client/lib/transport/browser/websocket.js 210 bytes {0} [built]
[30] ./~/sockjs-client/lib/transport/xhr-streaming.js 1.25 kB {0} [built]
[31] ./~/sockjs-client/lib/transport/lib/ajax-based.js 1.31 kB {0} [built]
[32] ./~/sockjs-client/lib/transport/lib/sender-receiver.js 1.18 kB {0} [built]
[33] ./~/sockjs-client/lib/transport/lib/buffered-sender.js 2.3 kB {0} [built]
[34] ./~/sockjs-client/lib/transport/lib/polling.js 1.32 kB {0} [built]
[35] ./~/sockjs-client/lib/transport/receiver/xhr.js 1.58 kB {0} [built]
[36] ./~/sockjs-client/lib/transport/sender/xhr-cors.js 343 bytes {0} [built]
[37] ./~/sockjs-client/lib/transport/browser/abstract-xhr.js 4.8 kB {0} [built]
[38] ./~/sockjs-client/lib/transport/sender/xhr-local.js 352 bytes {0} [built]
[39] ./~/sockjs-client/lib/utils/browser.js 560 bytes {0} [built]
[40] ./~/sockjs-client/lib/transport/xdr-streaming.js 984 bytes {0} [built]
[41] ./~/sockjs-client/lib/transport/sender/xdr.js 2.46 kB {0} [built]
[42] ./~/sockjs-client/lib/transport/eventsource.js 766 bytes {0} [built]
[43] ./~/sockjs-client/lib/transport/receiver/eventsource.js 1.58 kB {0} [built]
[44] ./~/sockjs-client/lib/transport/browser/eventsource.js 37 bytes {0} [built]
[45] ./~/sockjs-client/lib/transport/lib/iframe-wrap.js 981 bytes {0} [built]
[46] ./~/sockjs-client/lib/transport/iframe.js 3.83 kB {0} [built]
[47] ./~/json3/lib/json3.js 43.3 kB {0} [built]
[48] (webpack)/buildin/amd-options.js 43 bytes {0} [built]
[49] ./~/sockjs-client/lib/version.js 26 bytes {0} [built]
[50] ./~/sockjs-client/lib/utils/iframe.js 5.04 kB {0} [built]
[51] ./~/sockjs-client/lib/utils/object.js 532 bytes {0} [built]
[52] ./~/sockjs-client/lib/transport/htmlfile.js 710 bytes {0} [built]
[53] ./~/sockjs-client/lib/transport/receiver/htmlfile.js 2.2 kB {0} [built]
[54] ./~/sockjs-client/lib/transport/xhr-polling.js 894 bytes {0} [built]
[55] ./~/sockjs-client/lib/transport/xdr-polling.js 712 bytes {0} [built]
[56] ./~/sockjs-client/lib/transport/jsonp-polling.js 1.02 kB {0} [built]
[57] ./~/sockjs-client/lib/transport/receiver/jsonp.js 5.57 kB {0} [built]
[58] ./~/sockjs-client/lib/transport/sender/jsonp.js 2.46 kB {0} [built]
[59] ./~/sockjs-client/lib/main.js 12 kB {0} [built]
[60] ./~/sockjs-client/lib/shims.js 17.2 kB {0} [built]
[61] ./~/sockjs-client/lib/utils/escape.js 2.36 kB {0} [built]
[62] ./~/sockjs-client/lib/utils/transport.js 1.35 kB {0} [built]
[63] ./~/sockjs-client/lib/utils/log.js 450 bytes {0} [built]
[64] ./~/sockjs-client/lib/event/event.js 477 bytes {0} [built]
[65] ./~/sockjs-client/lib/location.js 178 bytes {0} [built]
[66] ./~/sockjs-client/lib/event/close.js 295 bytes {0} [built]
[67] ./~/sockjs-client/lib/event/trans-message.js 292 bytes {0} [built]
[68] ./~/sockjs-client/lib/info-receiver.js 2.22 kB {0} [built]
[69] ./~/sockjs-client/lib/transport/sender/xhr-fake.js 456 bytes {0} [built]
[70] ./~/sockjs-client/lib/info-iframe.js 1.52 kB {0} [built]
[71] ./~/sockjs-client/lib/info-iframe-receiver.js 791 bytes {0} [built]
[72] ./~/sockjs-client/lib/info-ajax.js 1.03 kB {0} [built]
[73] ./~/sockjs-client/lib/iframe-bootstrap.js 2.9 kB {0} [built]
[74] ./~/sockjs-client/lib/facade.js 723 bytes {0} [built]
[75] (webpack)/hot/dev-server.js 1.85 kB {0} [built]
[76] (webpack)/hot/log-apply-result.js 813 bytes {0} [built]
ERROR in multi app
Module not found: Error: Cannot resolve 'file' or 'directory' ./main.js in D:\Workspace\pact-js\js00\pact-node-example-master\app
# multi app
ERROR in Error: Child compilation failed:
Entry module not found: Error: Cannot resolve 'file' or 'directory' D:\Workspace\pact-js\js00\pact-node-example-master\app\template.html in D:\Workspace\pact-js\js00\pact-node-example-master\app:
Error: Cannot resolve 'file' or 'directory' D:\Workspace\pact-js\js00\pact-node-example-master\app\template.html in D:\Workspace\pact-js\js00\pact-node-example-master\app
- compiler.js:76
[pact-node-example-master]/[html-webpack-plugin]/lib/compiler.js:76:16
- Compiler.js:214 Compiler.
[pact-node-example-master]/[webpack]/lib/Compiler.js:214:10
- Compiler.js:403
[pact-node-example-master]/[webpack]/lib/Compiler.js:403:12
- Tapable.js:67 Compiler.next
[pact-node-example-master]/[tapable]/lib/Tapable.js:67:11
- CachePlugin.js:40 Compiler.
[pact-node-example-master]/[webpack]/lib/CachePlugin.js:40:4
- Tapable.js:71 Compiler.applyPluginsAsync
[pact-node-example-master]/[tapable]/lib/Tapable.js:71:13
- Compiler.js:400 Compiler.
[pact-node-example-master]/[webpack]/lib/Compiler.js:400:9
- Compilation.js:577 Compilation.
[pact-node-example-master]/[webpack]/lib/Compilation.js:577:13
- Tapable.js:60 Compilation.applyPluginsAsync
[pact-node-example-master]/[tapable]/lib/Tapable.js:60:69
- Compilation.js:572 Compilation.
[pact-node-example-master]/[webpack]/lib/Compilation.js:572:10
- Tapable.js:60 Compilation.applyPluginsAsync
[pact-node-example-master]/[tapable]/lib/Tapable.js:60:69
- Compilation.js:567 Compilation.
[pact-node-example-master]/[webpack]/lib/Compilation.js:567:9
- Tapable.js:60 Compilation.applyPluginsAsync
[pact-node-example-master]/[tapable]/lib/Tapable.js:60:69
- Compilation.js:563 Compilation.
[pact-node-example-master]/[webpack]/lib/Compilation.js:563:8
- Tapable.js:60 Compilation.applyPluginsAsync
[pact-node-example-master]/[tapable]/lib/Tapable.js:60:69
- Compilation.js:525 Compilation.seal
[pact-node-example-master]/[webpack]/lib/Compilation.js:525:7
Child html-webpack-plugin for "index.html":
ERROR in Entry module not found: Error: Cannot resolve 'file' or 'directory' D:\Workspace\pact-js\js00\pact-node-example-master\app\template.html in D:\Workspace\pact-js\js00\pact-node-example-maste
r\app
webpack: Failed to compile.
Finally, i created main.js and Template.html files. And i succeeded in compiling but i dont know what code to implement in my files!!
Thanks a lot
I have a Raspberry Pi 3 with the Raspbian GNU/Linux 8 (Jessie) OS.
I wrote this simple program. I compiled it with gcc -o hello hello.c.
#include <stdio.h>
void main(){
printf("hello!\n");
}
From from the readelf output everything seems OK:
Program Headers:
Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
EXIDX 0x0004cc 0x000104cc 0x000104cc 0x00008 0x00008 R 0x4
PHDR 0x000034 0x00010034 0x00010034 0x00120 0x00120 R E 0x4
INTERP 0x000154 0x00010154 0x00010154 0x00019 0x00019 R 0x1
[Requesting program interpreter: /lib/ld-linux-armhf.so.3]
LOAD 0x000000 0x00010000 0x00010000 0x004d8 0x004d8 R E 0x10000
LOAD 0x000f0c 0x00020f0c 0x00020f0c 0x0011c 0x00120 RW 0x10000
DYNAMIC 0x000f18 0x00020f18 0x00020f18 0x000e8 0x000e8 RW 0x4
NOTE 0x000170 0x00010170 0x00010170 0x00044 0x00044 R 0x4
GNU_STACK 0x000000 0x00000000 0x00000000 0x00000 0x00000 RW 0x10
GNU_RELRO 0x000f0c 0x00020f0c 0x00020f0c 0x000f4 0x000f4 R 0x1
But when I run the program the stack is executable:
0x7efdf000 0x7f000000 0x00000000 rwx [stack]
I try to compile also with the option -z noexecstack, but nothing change.
I try also to download the version of libarmmem.so that have this code:
#if defined(__linux__) && defined(__ELF__)
.section .note.GNU-stack,"",%progbits
#endif
But nothing change.
Why is the stack segment executable on Raspberry Pi?
Edit I add the output of the LD_DEBUG=files ./hello command
23110:
23110: file=/usr/lib/arm-linux-gnueabihf/libarmmem.so [0]; needed by ./hello [0]
23110: file=/usr/lib/arm-linux-gnueabihf/libarmmem.so [0]; generating link map
23110: dynamic: 0x76f273fc base: 0x76f13000 size: 0x00014524
23110: entry: 0x76f13568 phdr: 0x76f13034 phnum: 6
23110:
23110:
23110: file=libc.so.6 [0]; needed by ./hello [0]
23110: file=libc.so.6 [0]; generating link map
23110: dynamic: 0x76f0ef20 base: 0x76dd4000 size: 0x0013e550
23110: entry: 0x76dea840 phdr: 0x76dd4034 phnum: 10
23110:
23110:
23110: calling init: /lib/arm-linux-gnueabihf/libc.so.6
23110:
23110:
23110: calling init: /usr/lib/arm-linux-gnueabihf/libarmmem.so
23110:
23110:
23110: initialize program: ./hello
23110:
23110:
23110: transferring control: ./hello
23110:
hello!
23110:
23110: calling fini: ./hello [0]
23110:
23110:
23110: calling fini: /usr/lib/arm-linux-gnueabihf/libarmmem.so [0]
23110:
Add more info:
I edit the file architecture.S, and after the make I received:
gcc -std=gnu99 -O2 -c -o trampoline.o trampoline.c
gcc -shared -o libarmmem.so architecture.o memcmp.o memcpymove.o memcpymove-a7.o memset.o trampoline.o
`architecture' referenced in section `.text' of trampoline.o: defined in discarded section `.note.GNU-stack' of architecture.o
`architecture' referenced in section `.text' of trampoline.o: defined in discarded section `.note.GNU-stack' of architecture.o
`architecture' referenced in section `.text' of trampoline.o: defined in discarded section `.note.GNU-stack' of architecture.o
`architecture' referenced in section `.text' of trampoline.o: defined in discarded section `.note.GNU-stack' of architecture.o
collect2: error: ld returned 1 exit status
Makefile:13: recipe for target 'libarmmem.so' failed
make: *** [libarmmem.so] Error 1
It is likely that /usr/lib/arm-linux-gnueabihf/libarmmem.so is causing this. I found this source file:
https://github.com/bavison/arm-mem/blob/master/architecture.S
It lacks the non-executable stack annotation, so glibc conservatively makes the stack executable when the DSO is preloaded. The other source files have this:
/* Prevent the stack from becoming executable */
#if defined(__linux__) && defined(__ELF__)
.section .note.GNU-stack,"",%progbits
#endif
So you just need to copy this into architecture.S (at the end of the file) and rebuild.
You can verify with eu-readelf -l /usr/lib/arm-linux-gnueabihf/libarmmem.so if this DSO is indeed the culprit. It should show either no GNU_STACK program header at all, or a GNU_STACK program header which is marked RWE in the penultimate column.
Let's say that I have a number of URL strings and I want to extract 'meaningful' information from. Namely, I want to know what is the page which that url specifies. So if the site is subaru.com, did this come from the about page, special deals page, etc.
[1] "http://www.subaru.com/vehicles/impreza/index.html"
[2] "http://www.subaru.com/index.html?s_kwcid=subaru&k_clickid=214495e6-dbe0-6668-9222-00003d7cd876&prid=87&k_affcode=76602"
[3] "http://www.subaru.com/index.html?s_kwcid=subaru models&k_clickid=3ec14630-aa7f-b968-c389-00003e9a93f9&prid=87&k_affcode=77236"
[4] "http://www.subaru.com/customer-support.html"
[5] "http://www.subaru.com/"
[6] "http://www.subaru.com/vehicles/forester/index.html"
[7] "http://www.subaru.com/auto-show/detroit-2014.html"
[8] "http://www.subaruofchampaigncounty.com/index.htm"
[9] "http://www.subaru.com/build-your-own/impreza.html?zip=92106"
[10] "http://www.subaru.com/mobile/index.html"
[11] "http://www.subaru.com/"
[12] "http://www.subaru.com/"
[13] "http://www.subaru.com/index.html?s_kwcid=subaru&k_clickid=2361a001-195a-29c8-7323-00003c593714&prid=87&k_affcode=76602"
[14] "http://www.subaru.ru/index"
[15] "http://www.subarugeorgetown.com/certified/subaru/2013-subaru-outback-georgetown-tx-1b523a570a0a00de63937097e2f3723d.htm"
[16] "http://www.subaru.com/"
[17] "http://www.subaru.com/?s_kwcid=suburau&k_clickid=41a2c6dc-c9fa-6ac8-9bf0-000044fe28d7&prid=87&k_affcode=2966&gclid=cprrlygp-rscfugs7aodbkiaaw"
[18] "http://www.subaru.com/mobile/index.html"
[19] "http://www.subaru.com/mobile/index.html"
[20] "http://www.subaru.com/enthusiasts/index.html"
[21] "http://www.subaru.ru/index"
[22] "http://www.subaru.ru/index"
[23] "http://www.subaru.com/mobile/index.html"
[24] "http://www.subaru.com/"
[25] "http://www.subaru.com/"
[26] "http://www.subaru.com/"
[27] "http://www.subaru.com/enthusiasts/index.html"
[28] "http://www.subaruofdayton.com/tcd/home/?tcdkwid=22194961&tcdcmpid=19148&tcdadid=6852747105&locale=en_us"
[29] "http://www.subaru.com/build-your-own/outback.html?sc_brochure=subaru.outback.2014-specifications"
[30] "http://www.subaruofatlanta.com/featured-vehicles/used.htm?reset=inventorylisting"
[31] "http://www.subaru.com/customer-support.html"
[32] "http://www.subarupacific.com/index.htm?cikw=+subaru&cimt=b&cipl=&cinetwork=search&ciagaid=49620691888&gclid=clhf0uoq-rscffpm7aodtv0aiw"
[33] "http://www.subaru.ru/index"
[34] "http://www.subaru.ru/lineup/forester/spec/spec"
[35] "http://www.subaru.com/build-your-own/forester.html?zip=37211"
[36] "http://www.subaru.com/mobile/index.html"
[37] "http://www.subaruelcajon.com/index.htm"
[38] "http://www.subaru.com/customer-support.html"
[39] "http://www.subaru.com/vehicles/brz/index.html?s_kwcid=brz&k_clickid=1ec224f1-18c6-a228-5afb-000047ecef67&prid=87&k_affcode=197257&gclid=cpik35-r-rscfrsffgodhk4ajg"
[40] "http://www.subaru.com/mobile/index.html"
[41] "http://www.subaru.com/mobile/index.html"
[42] "http://www.subaru.ru/index"
[43] "http://www.subaru.com/"
[44] "http://www.subaru.com/vehicles/xv-crosstrek/index.html"
[45] "http://www.subaru.com/customer-support.html"
[46] "http://www.subaru.com/mobile/index.html"
[47] "http://www.subaru.ru/index"
[48] "http://www.subaru.com/index.html?s_kwcid=subaru&k_clickid=293d9ff9-a1ad-8489-82d3-00001e3a514f&prid=87&k_affcode=76602"
[49] "http://www.subaruofkingsautomall.com/index.htm"
[50] "http://www.subaru.com/index.html?s_kwcid=subaru&k_clickid=5ed77da1-f786-55e9-02d1-000055d135fc&prid=87&k_affcode=76602"
[51] "http://www.subaru.com/index.html?s_kwcid=subaru&k_clickid=1645e9d9-05b5-1fe8-d2b1-00002a3ce9e8&prid=87&k_affcode=76602"
[52] "https://www.subaru.com/my-subaru/account.html"
[53] "http://www.subaru.com/index.html?s_kwcid=subaru&k_clickid=0c0e3142-706d-4cc8-830f-00001ba63c96&prid=87&k_affcode=76602"
[54] "http://www.subaru.com/index.html?s_kwcid=subaru&k_clickid=3a594c6a-4485-d2c9-aabf-000051bdfc1d&prid=87&k_affcode=76602"
[55] "http://www.subaru.com/"
[56] "http://www.subaru.com/customer-support.html"
[57] "http://www.subaru.com/build-your-own/index.html"
[58] "http://www.subaru.com/"
[59] "http://www.subaru.com/mobile/index.html"
[60] "http://www.subaru.com/vehicles/brz/photos-videos.html?site=370595&placement=96106620&ad=7514606&creative=0"
[61] "http://www.subaru.com/customer-support.html"
[62] "http://www.subaru.com/"
[63] "http://www.subaru.com/"
[64] "http://www.subaru.com/customer-support.html"
[65] "http://www.subaru.com/mobile/index.html"
[66] "http://www.subaru.com/mobile/index.html"
[67] "http://www.subaru.com/"
[68] "http://www.subaru.com/mobile/index.html"
[69] "http://www.subaru.com/build-your-own/impreza.html?zip=01504"
[70] "http://www.subaru.com/enthusiasts/badge-of-ownership/index.html"
[71] "http://www.subaru.com/"
[72] "http://www.subaru.com/mobile/index.html"
[73] "http://www.subaruofcolumbia.com/used-inventory/index.htm"
[74] "http://www.subaru.com/customer-support.html"
[75] "http://www.subaru.com/"
[76] "http://www.subaruofpuyallup.com/tcd/home/?tcdkwid=22163386&tcdcmpid=13971&tcdadid=35753423988&locale=en_us"
[77] "http://www.subaru.com/mobile/vehicles/forester/index.html"
[78] "http://www.subaru.com/mobile/index.html"
[79] "http://www.subaru.com/"
[80] "http://www.subaru.com/"
As you can see, there's no specific rule I can use to extract just one thing from the URL string because each is different. Furthermore, notice that some have an extension of .ru and not .com. Right now, I've put together the following code but I still want to extract the page (xv-crosstrek, customer-support, etc)
mydat$URL_One <- gsub(".*www\\.([[:alpha:]]+\\.com).*","\\1", mydat$URL)
mydat$URL_Two <- gsub(".*\\.com","", mydat$URL)
Can anyone help with this task?
I'm thinking that I may want to remove all incidents of /index in each URL string.
So for some examples.
before:
"http://www.subaru.com/vehicles/forester/index.html"
after:
forester
before:
http://www.subaruofcolumbia.com/used-inventory/index.htm
after:
used-inventory
before:
http://www.subaru.com/build-your-own/forester.html?zip=37211
after:
build-your-own
There's the httr package, which has the function parse_url. For example, you can do
<r> parse_url("http://www.subaru.com/vehicles/forester/index.html")
$scheme
[1] "http"
$hostname
[1] "www.subaru.com"
$port
NULL
$path
[1] "vehicles/forester/index.html"
$query
NULL
$params
NULL
$fragment
NULL
$username
NULL
$password
NULL
attr(,"class")
[1] "url"
Which perhaps gets you part of the way there.
R has two handy functions for this. basename returns the basename of a url, while dirname returns the directory name (or path). Taking urls to be your first ten urls, I think we can achieve the results you're looking for with the following.
> urls
# [1] "http://www.subaru.com/vehicles/impreza/index.html"
# [2] "http://www.subaru.com/index.html?s_kwcid=subaru&k_clickid=214495e6-dbe0-6668-9222-00003d7cd876&prid=87&k_affcode=76602"
# [3] "http://www.subaru.com/index.html?s_kwcid=subaru models&k_clickid=3ec14630-aa7f-b968-c389-00003e9a93f9&prid=87&k_affcode=77236"
# [4] "http://www.subaru.com/customer-support.html"
# [5] "http://www.subaru.com/"
# [6] "http://www.subaru.com/vehicles/forester/index.html"
# [7] "http://www.subaru.com/auto-show/detroit-2014.html"
# [8] "http://www.subaruofchampaigncounty.com/index.htm"
# [9] "http://www.subaru.com/build-your-own/impreza.html?zip=92106"
# [10] "http://www.subaru.com/mobile/index.html"
> ifelse(grepl('index|zip', basename(urls)),
gsub('^.*/', '', dirname(urls)),
gsub('\\.html', '', basename(urls)))
# [1] "impreza" "www.subaru.com"
# [3] "www.subaru.com" "customer-support"
# [5] "www.subaru.com" "forester"
# [7] "detroit-2014" "www.subaruofchampaigncounty.com"
# [9] "build-your-own" "mobile"