Error "Can not resolve reference to multiname unambiguously" - facebook

Personal is giving this error and I can not solve it.
Can not resolve reference to multiname unambiguously. FacebookMobile (from C: \ Users \
Robinho \ Adobe Flex Builder 4.6 \ FacebookMobile \ src \ FacebookMobile.mxml) and
com.facebook.graph: FacebookMobile (from C: \ Users \ Robinho \ Adobe Flex Builder 4.6 \
FacebookMobile \ libs \ GraphAPI_Mobile_1_8_1 . swc (com.facebook.graph: FacebookMobile))
are available.

You have two classes with same name FacebookMobile one is defined by FacebookMobile.mxml and other exists in GraphAPI_Mobile_1_8_1.swc (library).
You should avoid naming new classes as ones that already defined by libraries you use. (If they properly namespaced this should not be an issue, but this probably isn't a case)

Related

wget to mirror site make exception to `--no-parent`

I want to mirror a site using wget:
wget --mirror \
--convert-links \
--adjust-extension \
--page-requisites \
--no-parent \
--wait=2 \
--progress=bar \
--show-progress \
--output-file=$LOG_FILE \
--directory-prefix=$DIR_PATH \
$URL
Now, it has been working well but I have come accross a website where the main page from which I want to start is under https://www.website.org/unique_path/here.html but it contains references to files or links that are like: https://www2.website.org/unique_path/there.pdf. However, --no-parent prevents the download of the content under www2... URL. Is there a way to circumvent this? (Or some option that would explicitly work as --no-parent by specifying some wildcard expression that it is ok to go and download here and there?
Is there a way to circumvent this?
You are apparently looking for Spanning Hosts options, you must provide -H option and then you might deliver comma-separated list of acceptable domains via -D, using your example
wget <your current options here> -H -D www.website.org,www2.website.org <your URL here>

Build all packages for an image

Is it possible to build all of the packages for a specific image? I know I can build packages individually, but ideally would like to build all of them at once, through a single command.
Alternatively, is there a way to prevent the do_rootfs task from being executed for a particular image.
Cheers, Donal
First make an image that contains a packagegroup (or just list your dependencies there).
$ cat sources/meta-custom/recipes-custom/images/only-packages-image.bb
SUMMARY = "All dependencies no image"
LICENSE = "CLOSED"
version = "##DISTRO_VERSION##"
BB_SCHEDULER = "speed"
# option 1 - packagegroup, package list can be reused in real image
CORE_IMAGE_BASE_INSTALL += "\
packagegroup_all-depends \
"
# option 2 - list deps here, package list can not be reused in real image
CORE_IMAGE_BASE_INSTALL += "\
lshw \
systemd \
cronie \
glibc \
sqlite \
bash \
python3-dev \
python3-2to3 \
python3-misc \
python3-pyvenv \
python3-modules \
python3-pip \
wget \
apt \
pciutils \
file \
tree \
\
wpa-supplicant \
dhcpcd \
networkmanager \
curl-dev \
curl \
hostapd \
iw \
"
# remove the rootfs step
do_rootfs() {
}
Second make your packagegroup if you opted to reuse the list of packages
$ cat sources/meta-custom/recipes-custom/packagegroups/packagegroup-alldeps.bb
PACKAGE_ARCH = "${MACHINE_ARCH}"
inherit packagegroup
RDEPENDS_${PN} = " \
lshw \
systemd \
cronie \
glibc \
sqlite \
bash \
python3-dev \
python3-2to3 \
python3-misc \
python3-pyvenv \
python3-modules \
python3-pip \
wget \
apt \
pciutils \
file \
tree \
\
wpa-supplicant \
dhcpcd \
networkmanager \
curl-dev \
curl \
hostapd \
iw \
"
Finally build your new image placeholder
$ bitbake only-packages-image
In Yocto >=4.0 this is actually pretty easy to achieve. The packagegroup method did not work for me at all.
I don't know if this works in older versions though.
Create a new file in your custom layer, e.g. meta-custom/classes/norootfs.bbclass and put the following lines in there (as far as I noticed the order does not matter):
deltask do_deploy
deltask do_image
deltask do_rootfs
deltask do_image_complete
deltask do_image_setscene
then in your meta-custom/recipes-core/images/myimage.bb add norootfs to your other inherit commands
e.g. the most basic one
inherit core-image norootfs
You will notice your number of tasks decreasing by a fair amount (mine from ~4700 to ~3000) and there is no complete rootfs image anymore in build/tmp/deploy/images, except for bzImage and modules, just the plain ipk files in build/tmp/deploy/ipk.
I got this information by looking at https://docs.yoctoproject.org/ref-manual/tasks.html?highlight=do_image and .bbclass files in meta/classes where deltask is frequently used.

|Ubuntu 18.04, opencv-3.4.0, MATLAB/R2018a| make fails on undefined reference to cv::dnn::eperimental

I have followed the wiki steps to install mexopencv, but I get the following error:
$ make MATLABDIR=/usr/local/MATLAB/R2018a WITH_CONTRIB=true all contrib
/tmp/mex_17713079591682_20541/Net_.o: In function `mexFunction':
Net_.cpp:(.text+0x10dd): undefined reference to `cv::dnn::experimental_dnn_v3::Net::Net()'
Net_.cpp:(.text+0x11ac): undefined reference to `cv::dnn::experimental_dnn_v3::readNetFromCaffe(cv::String const&, cv::String const&)'
Net_.cpp:(.text+0x122a): undefined reference to `cv::dnn::experimental_dnn_v3::Net::~Net()'
.. and so on
If I see what is to be built in opencv, the module dnn is present, which makes me wonder.
-- General configuration for OpenCV 3.4.0 =====================================
-- OpenCV modules:
-- To be built: aruco bgsegm bioinspired calib3d ccalib core datasets dnn dpm face features2d flann freetype fuzzy hdf highgui img_hash imgcodecs imgproc line_descriptor ml objdetect optflow phase_unwrapping photo plot python_bindings_generator reg rgbd saliency shape stereo stitching structured_light superres surface_matching text tracking video videoio videostab xfeatures2d ximgproc xobjdetect xphoto
-- Disabled: js python2 python3 world
-- Disabled by dependency: -
-- Unavailable: cnn_3dobj cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev cvv dnn_modern java matlab ovis sfm ts viz
Built modules:
$ pkg-config --cflags --libs opencv
-I/usr/local/include/opencv ..etc.. -lopencv_dnn .. etc
Current opencv version is:
$ pkg-config --modversion opencv
3.4.0
Question is; Is there a way to workaround/fix this, by i.e. disabling/unlinking dnn?
Or how do I actually compile the dnn file needed to get this reference to work?
{edit 1} file is actually compiled in:
$ ls /usr/local/include/opencv2/
...
bioinspired dnn fuzzy imgproc optflow saliency superres videoio xphoto.hpp
bioinspired.hpp dnn.hpp fuzzy.hpp imgproc.hpp
...
{edit 2} Unlinking -lopencv_dnn in the mexopencv Makefile by adding:
CV_LDFLAGS := $(filter-out -lopencv_dnn,$(CV_LDFLAGS))
is not an option, as still compilation fails on undefined reference to cv::dnn::experimental_dnn_v3. So I guess i'll need a fix for that.
Found the solution to my problem. Cause was blindly following mexopencv for the Opencv installation part. I had to use the following in the cmake step:
# build and compile opencv-3.4.0:
$ cmake -G "Unix Makefiles" \
-DBUILD_DOCS=OFF \
-DBUILD_EXAMPLES=OFF \
-DBUILD_PERF_TESTS=OFF \
-DBUILD_TESTS=OFF \
-DBUILD_JAVA=OFF \
-DWITH_CUDA=OFF \
-DWITH_CUBLAS:BOOL=OFF \
-DWITH_CUFFT:BOOL=OFF \
-DWITH_NVCUVID:BOOL=OFF \
-DBUILD_opencv_cudaarithm:BOOL=OFF \
-DBUILD_opencv_cudabgsegm:BOOL=OFF \
-DBUILD_opencv_cudacodec:BOOL=OFF \
-DBUILD_opencv_cudafeatures2d:BOOL=OFF \
-DBUILD_opencv_cudafilters:BOOL=OFF \
-DBUILD_opencv_cudaimgproc:BOOL=OFF \
-DBUILD_opencv_cudalegacy:BOOL=OFF \
-DBUILD_opencv_cudaobjdetect:BOOL=OFF \
-DBUILD_opencv_cudaoptflow:BOOL=OFF \
-DBUILD_opencv_cudastereo:BOOL=OFF \
-DBUILD_opencv_cudawarping:BOOL=OFF \
-DBUILD_opencv_cudev:BOOL=OFF \
-DBUILD_opencv_java=OFF \
-DBUILD_opencv_js=OFF \
-DBUILD_opencv_python2=OFF \
-DBUILD_opencv_python3=OFF \
-DBUILD_opencv_ts=OFF \
-DBUILD_opencv_world=OFF \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr/local \
-DOPENCV_ENABLE_NONFREE=ON \
-DOPENCV_EXTRA_MODULES_PATH=~/cv/opencv_contrib-3.4.0/modules ~/cv/opencv-3.4.0
$ make -j8 # -j$(nproc)
$ sudo make install
# compile mexopencv = OK
$ make MATLABDIR=/usr/local/MATLAB/R2018a WITH_CONTRIB=true all contrib
main difference to wiki is to remove the following two lines from the cmake step:
-DWITH_MATLAB=OFF \
-DBUILD_opencv_matlab=OFF \

a configure's options such as "--extra-cflags" --- I am confused

# configure for i386 build
./configure \
--cc=/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc \
--as='gas-preprocessor.pl /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc' \
--sysroot=/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk \
--extra-ldflags=-L/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/usr/lib/system \
--target-os=darwin \
--arch=i386 \
--cpu=i386 \
--extra-cflags='-arch i386' \
--extra-ldflags='-arch i386' \
--prefix=compiled/i386 \
--enable-cross-compile \
--disable-armv5te \
--disable-ffmpeg \
--disable-ffplay \
--disable-ffserver \
--disable-ffprobe \
--disable-doc
the below will build ffmpeg static libraries for i386. but i don't know about the option's means such as "--extra-cflags"、"--extra-ldflags"、"--sysroot="、"--as=".
who can tell me about those options mean ? where i can find the details explanation?
thanks . I am waitting for your help.
You can always run the configure script as configure --help; it will print a usage statement and information about many of the accepted parameters -- and usually, hopefully, the package-specific ones of interest.
That said, --extra-cflags would provide extra command-line switches for the C compiler, --as would give the path to the assembler, --sysroot would give an alternate installation directory, and --extra-ldflags would provide extra flags for the linker. Those are all fairly advanced, and you're unlikely to need to use them.
This is a funny configure script, because usual Autoconf ones use environment variables for such things like C flags (CFLAGS) and the C compiler location (CC). For example:
CC=/path/to/my/specific/gcc/version CFLAGS="-I/additional/include/dir -L/additional/library/dir" \
./configure --prefix=/installation/dir --host=cross-compiler-triplet-if-any \
--enable-something --with-some-feature --disable-something-else

Using boost on the iPhone

After alot of hacking i have managed to compile the boost-libraries for iphone, both device and simulator, but when i try to use them i get an error in the xcode debugger saying:
dyld: Library not loaded: libboost_graph.so.1.40.0
which im guessing is a dynamic library loader which isn't allowed on the iphone. i'm linking the app with -Lboost_graph as a compiler flag.
this is the script i used for building boost:
./bjam $1 $2 $3 \
toolset=darwin \
architecture=arm \
target-os=iphone \
macosx-version=iphone-3.0 \
define=_LITTLE_ENDIAN \
--layout=system \
--libdir=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/usr/lib \
--includedir=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/usr/include \
link=static \
runtime-link=static
./bjam $1 $2 $3 \
toolset=darwin \
architecture=x86 \
target-os=iphone \
macosx-version=iphonesim-3.0 \
--layout=system \
--libdir=/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk/usr/lib \
--includedir=/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk/usr/include \
link=static \
runtime-link=static
I'm guessing i am missing something very basic here, but what?
is the library compiled for dynamic loading (there is both an .a-file and a .so-file in the platform /usr/lib)
I might be wrong, but I think you will need to link your application statically with boost - the error message from dyld suggests that you are currently linking to the dynamic boost library (note the .so suffix in the error message - you want to be linking against the static one - libboost.a
you probably want to link your app with something like:
-iboost_graph -static
(assuming the .a file is called libboost_graph.a)