Re: Chuck Norris Fan.

268 views
Skip to first unread message

Shlomi Fish

unread,
Nov 22, 2021, 1:48:19 AM11/22/21
to Arvind Arya, emscripten-discuss
Hi Arvind!

I see your replies here:
https://groups.google.com/g/emscripten-discuss/c/rgIlaL5prEE

Otherwise:

1. using claws-mail, your email formatting is bad. Perhaps use an .asciidoc or
.md file on github/etc.

2. i don't know how the lib*.a files were generated.

3. Please give an SSCCE - read the whole of
https://github.com/shlomif/how-to-share-code-online and
https://github.com/shlomif/writing-the-perfect-question (no excuses!). Perhaps
use github actions.

On Sun, 21 Nov
2021 23:54:35 +0530 Arvind Arya <iamarv...@gmail.com> wrote:

> First I remember an Ad when Expedia try to make in India
> https://www.youtube.com/watch?v=Rmadver1Xdk.
> Rajnikant once won the world series of poker using UNO cards.
>
> Sorry I had to leave town due to some unforeseen circumstances. Thank you
> for asking I am still stuck. I was able to link the header files I made the
> object file main.o and the I am having trouble linking the library archives
> I tried everything
>
>
> *ld main.o libopencv_core.a libopencv_imgcodecs.a*
>
> *ld: symbol(s) not found for architecture x86_64*
> *clang: error: linker command failed with exit code 1 (use -v to see
> invocation)*
>
>
> tried the same command with* gcc and g++ The same error/*
> I combined the archives with command: *ar rcs all_the_object_files.o to
> newib.a*
> *tried with *
>
> *emcc main.cpp newlib.a -o hello.html --emrun*
>
> emcc: warning: newlib.a: archive is missing an index; Use emar when
> creating libraries to ensure an index is created [-Wemcc]
> emcc: warning: newlib.a: adding index [-Wemcc]
> error: undefined symbol: _ZN2cv3MatD1Ev (referenced by top-level compiled
> C/C++ code)
> warning: Link with `-s LLD_REPORT_UNDEFINED` to get more information on
> undefined symbols
> warning: To disable errors for undefined symbols use `-s
> ERROR_ON_UNDEFINED_SYMBOLS=0`
>
>
> A lot of Errors. How do I link these libraries with the object file.
> Thank You So much. I was wondering would it be so rude to ask you now. *Thank
> you very much.*
> *Arvind from Emscripten Group(My replies keep getting deleted there)*



--

Shlomi Fish https://www.shlomifish.org/
https://www.shlomifish.org/humour/bits/facts/Emma-Watson/

Fortran - there isn’t a way to do it... oh wait! Now there is.
https://www.shlomifish.org/humour/ways_to_do_it.html

Please reply to list if it's a mailing list post - https://shlom.in/reply .

Arvind Arya

unread,
Nov 22, 2021, 5:49:56 AM11/22/21
to emscripten-discuss

https://github.com/notasuperhero/New
Here in the file
"What I did here.txt"
I explain Everything.
Loved your Taylor Swift jokes btw.

Thank You for your help.
Arvind.

Shlomi Fish

unread,
Nov 23, 2021, 4:01:42 AM11/23/21
to Arvind Arya, emscripte...@googlegroups.com
Hi Arvind!

On Mon, 22 Nov 2021 02:49:56 -0800 (PST)
Arvind Arya <iamarv...@gmail.com> wrote:

> https://github.com/notasuperhero/New
> Here in the file
> "What I did here.txt"
> I explain Everything.
> Loved your Taylor Swift jokes btw.
>
> Thank You for your help.
> Arvind.
>
>

Thanks!

Sorry, but "emcmake cmake ../_opencv/" is failing here:

```
that is not in any export set.


CMake Error in CMakeLists.txt:
export called with target "opencv_dnn" which requires target "libprotobuf"
that is not in any export set.


CMake Error in CMakeLists.txt:
export called with target "opencv_imgcodecs" which requires target
"libjpeg-turbo" that is not in any export set.


CMake Error in CMakeLists.txt:
export called with target "opencv_imgcodecs" which requires target
"libwebp" that is not in any export set.


CMake Error in CMakeLists.txt:
export called with target "opencv_imgcodecs" which requires target "libpng"
that is not in any export set.


CMake Error in CMakeLists.txt:
export called with target "opencv_imgcodecs" which requires target
"libtiff" that is not in any export set.


CMake Error in CMakeLists.txt:
export called with target "opencv_imgcodecs" which requires target
"libopenjp2" that is not in any export set.


CMake Error in CMakeLists.txt:
export called with target "opencv_imgcodecs" which requires target "zlib"
that is not in any export set.


CMake Error in CMakeLists.txt:
export called with target "opencv_objdetect" which requires target "quirc"
that is not in any export set.


CMake Error in CMakeLists.txt:
export called with target "opencv_gapi" which requires target "ade" that is
not in any export set.


CMake Error in CMakeLists.txt:
export called with target "opencv_gapi" which requires target "ittnotify"
that is not in any export set.


-- Generating done
CMake Generate step failed. Build files cannot be regenerated correctly.
emcmake: error: 'cmake
-DCMAKE_CROSSCOMPILING_EMULATOR=/home/shlomif/Download/unpack/prog/llvm-to-js/emsdk/node/14.15.5_64bit/bin/node
-DCMAKE_TOOLCHAIN_FILE=/home/shlomif/Download/unpack/prog/llvm-to-js/emsdk/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake
../_opencv' failed (returned 1) [shlomif@telaviv1 scmake]$

```
“So, who the hell is Qoheleth?” - https://shlom.in/qoheleth

Chuck Norris round house kicks doors open instead of using their keys.
Summer Glau makes sure doors are open using her mind.
https://www.shlomifish.org/humour/bits/facts/Summer-Glau/

Arvind Arya

unread,
Nov 23, 2021, 4:34:01 AM11/23/21
to emscripten-discuss

Thank You for the reply, 
Let me tell you how I run it:
I installed openCV in my system and then made this CmakeLists.txt and then ran:
cmake.
and then
make
and then
./startProject
and it worked natively on my computer.


You are telling me about Export sets how do I get them in emcmake:
and everything else is fine? I just have so much confusion ? Is the object file made right? Are Libraries made right? Is this Cmake approach bypass the need for archiving libraries? Tell me where to go from here.
Thank You Very much.

Shlomi Fish

unread,
Nov 23, 2021, 6:50:40 AM11/23/21
to Arvind Arya, emscripte...@googlegroups.com
Hi Arvind!

I think I explained it to you already:

you need to build opencv and its libraries themselves using "em++" / "emcmake
cmake" against the opencv source (and it doesn't work here for me!).

You cannot (!!) reuse the binaries of opencv built using normal gcc/clang which
produce native (= x86-64 /etc.) binaries.

On Tue, 23 Nov 2021 01:34:00 -0800 (PST)
Arvind Arya <iamarv...@gmail.com> wrote:

> Thank You for the reply,
> Let me tell you how I run it:
> I installed openCV in my system and then made this CmakeLists.txt and then
> ran:
> *cmake*.
> and then
> *make*
> and then
> .*/startProject*
https://www.shlomifish.org/humour/bits/facts/Taylor-Swift/

Lone Starr: “Just what we need — a Druish princess.”
Barf: “Funny! She doesn’t look Druish.”
— Spaceballs, https://www.imdb.com/title/tt0094012/

Arvind Arya

unread,
Nov 23, 2021, 7:31:58 AM11/23/21
to emscripten-discuss
Thank You sir, 
I would like to apologise for my lack of understanding. Sir I cannot get references on how to build libraries can you please elaborate a little how to make "build opencv and its libraries themselves using "em++" / "emcmake 
cmake" against the opencv source"


I am really a newbie Sir, this is my first C++ big project. I have the OpenCV  downloaded where do I go from there. I see Modules. I see "OpenCV-Emscripten.cmake " in the folders.

There are source file are they platform dependent Do I need Makefiles of the src files ?

Can you explain to me like you would explain to a kid how to go about it?
 and also you can point me to the literature that will help me in all this because piecing this together from stack overflow and such places is stressing me out. 
Please Help.

Shlomi Fish

unread,
Nov 23, 2021, 8:05:48 AM11/23/21
to Arvind Arya, emscripte...@googlegroups.com
Hi!

On Tue, 23 Nov 2021 04:31:58 -0800 (PST)
Arvind Arya <iamarv...@gmail.com> wrote:

> Thank You sir,
> I would like to apologise for my lack of understanding. Sir I cannot get
> references on how to build libraries can you please elaborate a little how
> to make "*build opencv and its libraries themselves using "em++" /
> "emcmake *
> *cmake" against the opencv source"*
>

this script is as far as i got and "emcmake" fails:

```
#! /usr/bin/env bash
#
# shlomif.bash
# Copyright (C) 2021 Shlomi Fish < https://www.shlomifish.org/ >
#
# Distributed under the terms of the MIT license.
#
set -e -x

if ! test -e _opencv
then
git clone -b 4.5.4 https://github.com/opencv/opencv _opencv
fi

mkdir -p buildopencv
cd buildopencv
emcmake cmake ../_opencv
exit 0

em++ -I _opencv/include/ -I _opencv/modules/core/include/ -I
opencv/4.5.3_2/include/opencv4/ -I opencv/4.5.3_2/include/opencv4/opencv2/
main.cpp -D __OPENCV_BUILD=1 _opencv/modules/core/src/matrix.cpp

```

given I failed to build an emscripten version of opencv too, and you have
required too much hand-holding, I hereby give up on helping you.

Good luck!
Humanity - Parody of Modern Life - https://shlom.in/humanity

Wikipedia has a page about everything including the
https://en.wikipedia.org/wiki/Kitchen_sink .

https://www.shlomifish.org/humour.html

Arvind Arya

unread,
Nov 23, 2021, 8:20:51 AM11/23/21
to emscripten-discuss
Thank You So much for your help. Can you please tell me what books I can read to have a shot at cracking this.
Love your Sense of Humour and appreciate everything you have done.

Shlomi Fish

unread,
Nov 23, 2021, 9:08:25 AM11/23/21
to Arvind Arya, emscripte...@googlegroups.com
Hi!

On Tue, 23 Nov 2021 05:20:51 -0800 (PST)
Arvind Arya <iamarv...@gmail.com> wrote:

> Thank You So much for your help. Can you please tell me what books I can
> read to have a shot at cracking this.

I'm not sure - perhaps try perusing this:
https://github.com/shlomif/Freenode-programming-channel-FAQ/blob/master/FAQ_with_ToC__generated.md
and this: https://www.shlomifish.org/meta/FAQ/ . I learned a lot of this
"stuff" not from books:

https://www.joelonsoftware.com/2002/12/11/lord-palmerston-on-programming/

> Love your Sense of Humour and appreciate everything you have done.

I'm glad.

> On Tuesday, November 23, 2021 at 6:35:48 PM UTC+5:30 Shlomi Fish wrote:
>
> > Hi!


https://www.shlomifish.org/lecture/C-and-CPP/bad-elements/

The Zeroth Rule of Fight Club is that Chuck Norris can talk about Fight Club.
No one tells Chuck Norris what not to do.
https://www.shlomifish.org/humour/bits/facts/Chuck-Norris/
Reply all
Reply to author
Forward
0 new messages