Re: help with converting library to JS
my current errors are: during emcmake .. from sub directory: [root@osboxes _buikd]# /home/osboxes/emsdk/emscripten/1.37.36/emcmake .. emconfigure is a helper for configure, setting various environment variables so that emcc etc. are used. Typical usage: emconfigure ./configure [FLAGS] (but you can run any command instead of configure) ERROR:root:Exception thrown when invoking Popen in configure with args: ".."! Traceback (most recent call last): File "/home/osboxes/emsdk/emscripten/1.37.36/emconfigure", line 10, in python_selector.run(__file__) File "/home/osboxes/emsdk/emscripten/1.37.36/tools/python_selector.py", line 43, in run sys.exit(run_by_import(filename, main) if on_allowed_version() else run_by_subprocess(filename)) File "/home/osboxes/emsdk/emscripten/1.37.36/tools/python_selector.py", line 13, in run_by_import return getattr(importlib.import_module(os.path.basename(filename)), main)() File "/home/osboxes/emsdk/emscripten/1.37.36/emconfigure.py", line 47, in run shared.Building.configure(sys.argv[1:]) File "/home/osboxes/emsdk/emscripten/1.37.36/tools/shared.py", line 1520, in configure process = Popen(args, stdout=None if EM_BUILD_VERBOSE_LEVEL >= 2 else stdout, stderr=None if EM_BUILD_VERBOSE_LEVEL >= 1 else stderr, env=env) File "/usr/lib64/python2.7/subprocess.py", line 390, in __init__ errread, errwrite) File "/usr/lib64/python2.7/subprocess.py", line 1025, in _execute_child raise child_exception OSError: [Errno 13] Permission denied during emmake after i did normal cmake: checking for gcc... python /home/osboxes/emsdk/emscripten/1.37.36/emcc.py checking whether the C compiler works... no test are goin genrally ok for emscripten -- You received this message because you are subscribed to the Google Groups "emscripten-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-discuss+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: help with converting library to JS
Hello again, so I try to do as you told and now i have something like this: https://github.com/marwin1991/libamtrackforjs If someone could look at cmake and tell me if its good :) W dniu czwartek, 5 kwietnia 2018 08:44:06 UTC+2 użytkownik Peter napisał: > > Hello, I am working on application to provide easy way to use this library: > https://github.com/libamtrack/library > > generally the main purpose is provide it as easy to use web application. > So lately I am trying to convert it to JS using Emscripten. > > I have to problems: > 1. GSL > I found this: https://github.com/Planeshifter/gsl-js > the emmake make for this is generrly sucessful but I don't know how to use > it during building main lib > but genrally during emmake I get error: > fatal error: 'gsl/gsl_integration.h' file not found > #include > > 2. > make: > libtool: link: gfortran -shared -fPIC > .libs/libcernlibfuns_la-AT_CernlibFuns.o .libs/CERNLIBFUNS.o -lgsl > -lgslcblas -lm -g -O2 -Wl,-soname -Wl,libcernlibfuns.so.0 -o > .libs/libcernlibfuns.so.0.0.0 > libtool: link: (cd ".libs" && rm -f "libcernlibfuns.so.0" && ln -s > "libcernlibfuns.so.0.0.0" "libcernlibfuns.so.0") > > emmake make: > libtool: link: gfortran -shared -fPIC > .libs/libcernlibfuns_la-AT_CernlibFuns.o .libs/CERNLIBFUNS.o -lgsl > -lgslcblas -lm -g -O2 -Wl,-soname -Wl,libcernlibfuns.so.0 -o > .libs/libcernlibfuns.so.0.0.0 > .libs/libcernlibfuns_la-AT_CernlibFuns.o: file not recognized: File format > not recognized > collect2: error: ld returned 1 exit status > > I know that probably its really easy to figure it out how to do it, but I > spend last week trying to find some solution and nothing :( > If someone would give me a hint where to start it would be really greate. > Thank you for you time, > peter > > > > -- You received this message because you are subscribed to the Google Groups "emscripten-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-discuss+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: help with converting library to JS
PS: I found out that using Ubuntu emescripten package also isn't the best idea > so now i am download it from git. > Best option is to use the official emsdk as described here: https://kripken.github.io/emscripten-site/docs/getting_started/downloads.html -- You received this message because you are subscribed to the Google Groups "emscripten-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-discuss+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: help with converting library to JS
> So i should use this : https://github.com/GSL-for-JS/gsl-js or standar GSL? I would try standard GLS, and check whether gls-js was heavily modified to make it work on emscripten, but since it's mostly simple C code I guess it wasn't) > And using Ubuntu subsystem for Win is really bad idea for dealing with this problem? No it's fine, only problem I know of is that file operations are fairly slow through the WSL layer. > And i am sorry that i am taking your time but i am not so C person, i rather use higer level programing languages. It's more a build system problem than a language problem, it's always a build system problem in the C/C++ world ;) On Thursday, 5 April 2018 10:23:42 UTC+2, Peter wrote: > > Thank you for your replay. > I found out that using Ubuntu emescripten package also isn't the best idea > so now i am download it from git. > > About GSL > So i should use this : https://github.com/GSL-for-JS/gsl-js or standar > GSL? > > And using Ubuntu subsystem for Win is really bad idea for dealing with > this problem? > > And i am sorry that i am taking your time but i am not so C person, i > rather use higer level programing languages. > > > -- You received this message because you are subscribed to the Google Groups "emscripten-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-discuss+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: help with converting library to JS
>Wait, here is the problem, a big fat FORTRAN source file: > > https://github.com/libamtrack/library/blob/master/thirdparty/cernlib/CERNLIBFUNS.f > >I don't think it's possible to get that through emscripten. So I have to remove it with all dependencies to this, right? -- You received this message because you are subscribed to the Google Groups "emscripten-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-discuss+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: help with converting library to JS
...maybe a Fortran to C converter like this: http://cci.lbl.gov/fable/ would be solution..., but it might not be a trivial thing to do... On Thursday, 5 April 2018 10:16:57 UTC+2, Floh wrote: > > Wait, here is the problem, a big fat FORTRAN source file: > > > https://github.com/libamtrack/library/blob/master/thirdparty/cernlib/CERNLIBFUNS.f > > I don't think it's possible to get that through emscripten. > > On Thursday, 5 April 2018 10:12:12 UTC+2, Floh wrote: >> >> (1) I would try to start with a pure GSL source repo, not the gsl-js repo >> (this provides a precompiled .js blob callable from Javascript, but it >> looks like you need GSL as a normal C library to be compiled with >> libamtrack. >> >> (2) the main problem here which I don't understand is why it's trying to >> call gfortran, from looking over the repositories I haven't seen any >> Fortran sources (which would be a show stopper), all I've seen is C headers >> and sources (which is good) >> >> If I would tackle the problem I would probably throw away all the >> autoconf stuff, put all sources (GSL and libamtrack) into a common project >> directory, and write a simplest-possible cmake file with hardwired config >> for emscripten which compiles a static library. But YMMV of course :) >> >> On Thursday, 5 April 2018 08:44:06 UTC+2, Peter wrote: >>> >>> Hello, I am working on application to provide easy way to use this >>> library: >>> https://github.com/libamtrack/library >>> >>> generally the main purpose is provide it as easy to use web application. >>> So lately I am trying to convert it to JS using Emscripten. >>> >>> I have to problems: >>> 1. GSL >>> I found this: https://github.com/Planeshifter/gsl-js >>> the emmake make for this is generrly sucessful but I don't know how to >>> use it during building main lib >>> but genrally during emmake I get error: >>> fatal error: 'gsl/gsl_integration.h' file not found >>> #include >>> >>> 2. >>> make: >>> libtool: link: gfortran -shared -fPIC >>> .libs/libcernlibfuns_la-AT_CernlibFuns.o .libs/CERNLIBFUNS.o -lgsl >>> -lgslcblas -lm -g -O2 -Wl,-soname -Wl,libcernlibfuns.so.0 -o >>> .libs/libcernlibfuns.so.0.0.0 >>> libtool: link: (cd ".libs" && rm -f "libcernlibfuns.so.0" && ln -s >>> "libcernlibfuns.so.0.0.0" "libcernlibfuns.so.0") >>> >>> emmake make: >>> libtool: link: gfortran -shared -fPIC >>> .libs/libcernlibfuns_la-AT_CernlibFuns.o .libs/CERNLIBFUNS.o -lgsl >>> -lgslcblas -lm -g -O2 -Wl,-soname -Wl,libcernlibfuns.so.0 -o >>> .libs/libcernlibfuns.so.0.0.0 >>> .libs/libcernlibfuns_la-AT_CernlibFuns.o: file not recognized: File >>> format not recognized >>> collect2: error: ld returned 1 exit status >>> >>> I know that probably its really easy to figure it out how to do it, but >>> I spend last week trying to find some solution and nothing :( >>> If someone would give me a hint where to start it would be really greate. >>> Thank you for you time, >>> peter >>> >>> >>> >>> -- You received this message because you are subscribed to the Google Groups "emscripten-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-discuss+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: help with converting library to JS
Thank you for your replay. I found out that using Ubuntu emescripten package also isn't the best idea so now i am download it from git. About GSL So i should use this : https://github.com/GSL-for-JS/gsl-js or standar GSL? And using Ubuntu subsystem for Win is really bad idea for dealing with this problem? And i am sorry that i am taking your time but i am not so C person, i rather use higer level programing languages. -- You received this message because you are subscribed to the Google Groups "emscripten-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-discuss+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: help with converting library to JS
Wait, here is the problem, a big fat FORTRAN source file: https://github.com/libamtrack/library/blob/master/thirdparty/cernlib/CERNLIBFUNS.f I don't think it's possible to get that through emscripten. On Thursday, 5 April 2018 10:12:12 UTC+2, Floh wrote: > > (1) I would try to start with a pure GSL source repo, not the gsl-js repo > (this provides a precompiled .js blob callable from Javascript, but it > looks like you need GSL as a normal C library to be compiled with > libamtrack. > > (2) the main problem here which I don't understand is why it's trying to > call gfortran, from looking over the repositories I haven't seen any > Fortran sources (which would be a show stopper), all I've seen is C headers > and sources (which is good) > > If I would tackle the problem I would probably throw away all the autoconf > stuff, put all sources (GSL and libamtrack) into a common project > directory, and write a simplest-possible cmake file with hardwired config > for emscripten which compiles a static library. But YMMV of course :) > > On Thursday, 5 April 2018 08:44:06 UTC+2, Peter wrote: >> >> Hello, I am working on application to provide easy way to use this >> library: >> https://github.com/libamtrack/library >> >> generally the main purpose is provide it as easy to use web application. >> So lately I am trying to convert it to JS using Emscripten. >> >> I have to problems: >> 1. GSL >> I found this: https://github.com/Planeshifter/gsl-js >> the emmake make for this is generrly sucessful but I don't know how to >> use it during building main lib >> but genrally during emmake I get error: >> fatal error: 'gsl/gsl_integration.h' file not found >> #include >> >> 2. >> make: >> libtool: link: gfortran -shared -fPIC >> .libs/libcernlibfuns_la-AT_CernlibFuns.o .libs/CERNLIBFUNS.o -lgsl >> -lgslcblas -lm -g -O2 -Wl,-soname -Wl,libcernlibfuns.so.0 -o >> .libs/libcernlibfuns.so.0.0.0 >> libtool: link: (cd ".libs" && rm -f "libcernlibfuns.so.0" && ln -s >> "libcernlibfuns.so.0.0.0" "libcernlibfuns.so.0") >> >> emmake make: >> libtool: link: gfortran -shared -fPIC >> .libs/libcernlibfuns_la-AT_CernlibFuns.o .libs/CERNLIBFUNS.o -lgsl >> -lgslcblas -lm -g -O2 -Wl,-soname -Wl,libcernlibfuns.so.0 -o >> .libs/libcernlibfuns.so.0.0.0 >> .libs/libcernlibfuns_la-AT_CernlibFuns.o: file not recognized: File >> format not recognized >> collect2: error: ld returned 1 exit status >> >> I know that probably its really easy to figure it out how to do it, but I >> spend last week trying to find some solution and nothing :( >> If someone would give me a hint where to start it would be really greate. >> Thank you for you time, >> peter >> >> >> >> -- You received this message because you are subscribed to the Google Groups "emscripten-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-discuss+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: help with converting library to JS
(1) I would try to start with a pure GSL source repo, not the gsl-js repo (this provides a precompiled .js blob callable from Javascript, but it looks like you need GSL as a normal C library to be compiled with libamtrack. (2) the main problem here which I don't understand is why it's trying to call gfortran, from looking over the repositories I haven't seen any Fortran sources (which would be a show stopper), all I've seen is C headers and sources (which is good) If I would tackle the problem I would probably throw away all the autoconf stuff, put all sources (GSL and libamtrack) into a common project directory, and write a simplest-possible cmake file with hardwired config for emscripten which compiles a static library. But YMMV of course :) On Thursday, 5 April 2018 08:44:06 UTC+2, Peter wrote: > > Hello, I am working on application to provide easy way to use this library: > https://github.com/libamtrack/library > > generally the main purpose is provide it as easy to use web application. > So lately I am trying to convert it to JS using Emscripten. > > I have to problems: > 1. GSL > I found this: https://github.com/Planeshifter/gsl-js > the emmake make for this is generrly sucessful but I don't know how to use > it during building main lib > but genrally during emmake I get error: > fatal error: 'gsl/gsl_integration.h' file not found > #include > > 2. > make: > libtool: link: gfortran -shared -fPIC > .libs/libcernlibfuns_la-AT_CernlibFuns.o .libs/CERNLIBFUNS.o -lgsl > -lgslcblas -lm -g -O2 -Wl,-soname -Wl,libcernlibfuns.so.0 -o > .libs/libcernlibfuns.so.0.0.0 > libtool: link: (cd ".libs" && rm -f "libcernlibfuns.so.0" && ln -s > "libcernlibfuns.so.0.0.0" "libcernlibfuns.so.0") > > emmake make: > libtool: link: gfortran -shared -fPIC > .libs/libcernlibfuns_la-AT_CernlibFuns.o .libs/CERNLIBFUNS.o -lgsl > -lgslcblas -lm -g -O2 -Wl,-soname -Wl,libcernlibfuns.so.0 -o > .libs/libcernlibfuns.so.0.0.0 > .libs/libcernlibfuns_la-AT_CernlibFuns.o: file not recognized: File format > not recognized > collect2: error: ld returned 1 exit status > > I know that probably its really easy to figure it out how to do it, but I > spend last week trying to find some solution and nothing :( > If someone would give me a hint where to start it would be really greate. > Thank you for you time, > peter > > > > -- You received this message because you are subscribed to the Google Groups "emscripten-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-discuss+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.