myclabs/deep-copy unexpected function - deep-copy

I couldn't find a clear solution online, so I am including the problem and solution here for anybody who may have a similar problem.
unexpected 'function' (T_FUNCTION), expecting identifier (T_STRING) or \\\\ (T_NS_SEPARATOR) in /var/www/html/basic/vendor/myclabs/deep-copy/src/DeepCopy/deep_copy.php
deep-copy was causing the error above. It transpires this is because deep-copy >1.8.1 is incompatible with PHP v7.3 (which is what I am using).
I updated the composer.json file (forcing a downgrade of deep-copy) as follows and then ran composer update:
"require": {
"myclabs/deep-copy": "=1.8.0",
This solved the problem.
I hope somebody finds this useful.

solved as per comments above (by downgrading deep-copy)

Related

crosstool-NG ct-ng build step=libc_main issue w/GCC 11

Thanks to anyone who may be able to help sort out an issue I am having building the toolchain. I am in a Docker container (provisioned w/Ubuntu 'jammy' and am at the build phase.
My .config set to armv6-rpi-linux-gnueabihf and makes it to libc_main before failing with the following:
[EXTRA] Building C library localedef
[ERROR] ../sysdeps/nptl/pthread.h:744:47: error: argument 1 of type 'struct __jmp_buf_tag *' declared as a pointer [-Werror=array-parameter=]
Reading up on the issue, it seems gcc added some additional sanity check(s) for mis-matched array declarations - gcc.
I have tried a couple of times to change the extern declaration in ../sysdeps/nptl/pthread.h alas this seems to cause other issues in setjmp.h or it gets reverted by ct-ng.
I am wondering if I need to go to an older 8.x revision of gcc, to remove this issue.
Any insights greatly appreciated!

Error assigning to non-lvalue 'uxCurrentEventBits' event_groups.c

I am trying to run a FreeRTOS project on mikroC for ARM, but I get an assigning to non-lvalue 'uxCurrentEventBits' error. Please help fix it.
I downloaded an example from this source https://libstock.mikroe.com/projects/view/2083/freertos-v9-0-0-mikroc-examples
Where the error occurs:
const EventBits_t uxCurrentEventBits = pxEventBits->uxEventBits;
The problem was solved by installing the latest version of the compiler.

Including support and libraries for native interface error

I am sorry to bother you again but it still does not work with this... The new error is :
Could not find method compile() for arguments [{name=support-v4-25.0.0, ext=aar}] on DefaultExternalModuleDependency{group='com.opentok.android', name='opentok-android-sdk', version='2.11.0', configuration='default'}.
(Here is the entire Log)
In the library the properties file contains the following lines: (codenameone_library_required.properties)
codename1.arg.java.version=8
codename1.arg.android.buildToolsVersion=25.0.0
codename1.arg.android.playServicesVersion=9.8.0
codename1.arg.android.supportv4Dep=compile 'com.android.support\:support-v4\:25.+'
codename1.arg.android.gradleDep= compile 'com.opentok.android\:opentok-android-sdk\:2.11.0'
The codenameone_library_appended.properties file is empty.
We included the aar files (support-v4-25.0.0.aar, appcompat-v7-25.0.0.aar and opentok-android-sdk-2.11.0.aar) in the library in the native/android.
We are out of ideas to try, can you please help us again?
Thank you in advance !
Those hints aren't for the inclusion of the AAR. That's unnecessary. Once you include those hints the support library should "just work" and including the AAR will become redundant since we already include it.
We removed the aars, kept the one from opentok and added the support v7 arr and now it works ! Thank you very much !

mlpack error while building

I get the following error after I install libmlpack-dev, include it in my program and compile it.
/usr/include/mlpack/methods/kmeans/kmeans_impl.hpp: In member function ‘void mlpack::kmeans::KMeans<MetricType, InitialPartitionPolicy, EmptyClusterPolicy, LloydStepType, MatType>::Cluster(const MatType&, size_t, arma::mat&, bool)’:
/usr/include/mlpack/methods/kmeans/kmeans_impl.hpp:178:20: error: call of overloaded ‘isnan(double&)’ is ambiguous
if (isnan(cNorm) || isinf(cNorm))
^
/usr/include/mlpack/methods/kmeans/kmeans_impl.hpp:178:20: note: candidates are:
In file included from /usr/include/features.h:374:0,
from /usr/include/x86_64-linux-gnu/sys/types.h:25
Can someone suggest how to solve this.
P.S : I had asked this in
https://askubuntu.com/questions/847048/mlpack-error-while-building
This is an issue with mlpack on older versions of Ubuntu. If you upgrade Ubuntu to a newer version and update the mlpack package the issue should be solved. But if you are unable to do that, you can directly edit the file /usr/include/mlpack/methods/kmeans/kmeans_impl.hpp so that the line
if (isnan(cNorm) || isinf(cNorm))
is changed to
if (std::isnan(cNorm) || std::isinf(cNorm))
and this should fix the issue.

nsinstall: Bad file number error on Vista

I'm attempting to build Firefox on my Windows Vista Ultimate machine. I keep getting the following error:
nsinstall: Bad file number
I've read that this error is caused because of UAC in Vista. Here are the two articles that lead me to this conclusion. https://wiki.mozilla.org/Penelope_Developer_Page#Windows_Vista and http://www.kevinbrosnan.net/mozilla-build-error-nsinstall-bad-file-number
Using the standard "Run as Administrator", I've attempted to redo my build but I get the exact same error. I also started a normal command prompt as admin and then went to the batch file in mozilla-build (start-msvc8.bat) and ran it. Still, same error at the same point.
Any other insights on how I might either get around this error or perhaps something else is causing the error?
Note: I also posted something here in the hopes to get topic-specific help but I've not heard a peep... After I posted that I found the info on nsinstall. Anyway, I prefer SO so I thought I'd try here...
Update: I've attempted to completly disable UAC to correct the problem as is suggested by cnemelkasr. I've received the exact same error. This new knowledge is making me think that a file or folder is missing... Does anyone who has experience with NSInstall know what the given error -- Bad file number -- might mean? I figure it might be referring to a file handle...
If it really is a UAC error, you can try turning off UAC altogether. I've had to do this for several packages. There are numerous places on the web to get the instructions for doing that.
http://www.petri.co.il/disable_uac_in_windows_vista.htm is one of them.
I found the answer to my question. I'm posting the answer here to share the answer with others and to close this question.
After disabling the UAC, it was suggested that the directory depth was interfering with NSInstall. I moved the folder from c:/Users/Frank/Documents/hg-repos/firefox-src-hgRepo/mozilla-fv-expirement/ to C:/mozilla-fv-expirement/. Cleaned all previous build attempts and finally redid my build (with UAC off) and I received a working debug binary.
The suggestion was posted at: mozilla.dev.builds
The "Bad file number" message in the cases I have seen, is caused by too many arguments passed to execvp (command, argv) (or similar) function. But only from some programs. An old bash, sh or a Borland/Watcom program in your PATH is an likely candidate.
So when you shorten the name of the build directory, the total size of the command line (that eventually gets passed to CreateProcess()) gets shorter. I don't think UAC has anything to do with this since I've seen this on Win-XP too. But it's a bit strange Mozilla would not use relative paths while building. I guess it uses some directory prefix value in it's makefiles (I've never tried building it).
If you look at the documentation for _execvp():
http://msdn.microsoft.com/en-us/library/3xw6zy53.aspx
E2BIG is one of the possible errno values:
The space required for the arguments and environment settings exceeds 32 KB.
Now, here is the strange part.
Fact 1:
On Visual-C/MingW (any version), strerror(EBADF) doesn't return "Bad file number" .
(it return "Bad file descriptor").
Fact 2:
On Borland's CBuilder 5.6 and Watcom 1.9 (these do not use the MSVC runtime), strerror(EBADF) does indeed return "Bad file number".
Theory:
Is possible that Borland, Watcom (and other CRTs too?) mixes up the meaning of E2BIG and EBADF. Did that make any sense? Someone please correct me if you have a better theory.
I'm a bit confused myself...
Conclusion: Either shorten the size of your environment (easiest) or shorten the command-line (not always easy).
--gv

Resources