What happened to /usr/include/machine directory in Ubuntu 12.04? - linux

I'm trying to build/compile a old project using the original makefile. When I do so, I get the following error:
*** No rule to make target `/usr/include/machine/param.h'
My OS is Ubuntu 12.04. There seem to be plenty of param.h files, but no /usr/include/machine directory. Does anyone know which (if any) of the existing param.h files I should use ?
Thanks

I can't recall a /usr/include/machine/ directory before... but that said, try /usr/include/linux/param.h.

Related

How can I set Make Path in Makefile VS Code extension from Linux?

I'm new on this Makefile thing, and I'm having some issues trying to install the Makefile Extension from the VS Code Marketplace.
First of all, I'm using VS Code to connect to a remote machine, with RedHat8 kernel. It uses makefile and it works perfectly on a linux terminal, but now we are trying to migrate to VS Code.
So I was searching and I found this Makefile Extension.
On the extension settings, I have my Makefile Path defined, and it works, but I have some problem with the Make Path, because it is expecting a make.exe kind but I don't have any, because it's a linux server.
I know my make path is on /usr/bin/make, but it says it cannot find make path.
What should I put in there?
PS: Sorry for my bad english, and thank you!
You should not have to set the "Make Path" to anything, it should default to make.
By default the "Makefile Path" is ${workspaceFolder}/Makefile, but you can change it to whatever is required.
If you have a separate build folder, then it's better to set the "Make directory" instead.
For example, Debian packages are built under debian/build/main so set the makeDirectory like this:
{
"makefile.makeDirectory": "${workspaceFolder}/debian/build/main"
}

Cygwin Gcc error while loading shared libraries?

I have instaled Cygwin after running MinGW for a while now. But when I try to compile the console gives me:
/usr/lib/gcc/x86_64-pc-cygwin/4.9.2/cc1.exe: error while loading shared libraries: ?: cannot open shared object file: No such file or directory
What does this mean?
I have the same problem and I found the solution.
According to the FAQ of Cygwin
Q: Why is C:\cygwin\usr\bin invisible from windows?
A: Because it does not really exist. In cygwin, /usr/bin is just a link to /bin.
So trying to add "C:\cygwin\usr\bin" to PATH will be in vain.
Add "C:\cygwin64\bin" to PATH instead. Hope this helps :)
You are missing a library, please run cygcheck /usr/lib/gcc/x86_64-pc-cygwin/4.9.2/cc1.exe or ldd /usr/lib/gcc/x86_64-pc-cygwin/4.9.2/cc1.exe to see what is the missing library.
(I'd rather ask a question in the comments first, but I don't have enough reputation yet.)
Your cc1 is unable to load some DLLs it needs to start. Looking at the Cygwin source code, this can be either a library specified in LD_PRELOAD, or -- more probably -- a library the executable depends on. The ? in the error message seems to be the default return value of find_first_notloaded_dll (hookapi.cc), in case the function can't determine what library is missing.
To diagnose the issue, I suggest checking your PATH variable (or even clearing it of any non-Cygwin paths and trying the compilation again) and/or using Dependency Walker to find the missing DLLs (start it from a Cygwin shell, so it can see the same PATH). ldd (included with Cygwin) may also give some clues, but I wouldn't bet on it.
It's possible a clean re-install of Cygwin will be necessary to solve the issue.
Most likely, you are simply missing /usr/bin in the PATH variable.
Adding 'export PATH=/usr/bin:$PATH' to your .bashrc file will solve the issue.
Adding some background info. I had the same problem when building my own program and linking it against graphviz cgraph.dll. Turns out this is related to where windows searches for DLLs (see here: https://msdn.microsoft.com/en-us/library/7d83bc18.aspx) So adding the path of your missing library to PATH should fix the problem.
It is unfortunate that the message doesn't include the name of the library. Luckily cmd.exe DOES give you this name (so it's good for something after all;)
Are you including the path to your lib directory?
Looks like you are not
I'm not very familiar with Cygwin, I mainly use MinGW, but I think the error message speaks for itself
I also came this error on windows machine while executing .exe file generated by scilab2C i.e toolbox for Scilab
For Windows 32 bit Add the environment variable path as follow :
C:\cygwin\usr\i686-pc-cygwin\bin
Hope so this will solve your issue.
Just had this problem trying to compile a package with make and it wanted some cygguile dll file that was just installed along with make.
My solution was I had not only migrated my cygwin64 directory across drives because the sector sizes were mismatched for some reason even though the drivers were both under 2TB and should have been using 512 byte sector sizes.. So I had to install a new system and move files over there, might have had weird permissions on them.
Also had to patch cygwin1.dll end of Jan 2020 because of a recent input problem in ConEmu with Windows 10 1903 build, but just did it again with this working so that doesn't seem to be the issue.
Reinstalling cygwin by deleting that entire directory, taking ownership of it first.., seemed to work now...

Matlab Libopencv error using Linux

I am running into errors with opencv. I downloaded a package online and compiled each of the folders by cd into them and running make through the command line. But when I try using one of the functions, I run into this error: libopencv_core.so.2.3: cannot open shared object file: No such file or directory
The file its trying to reach is indeed there, since I checked this, but for some reason its saying its not. I am pretty bad at figuring out path problems but I think this is one of them. Can anyone tell me how to fix this? Thanks

"Could not open input file" crons error

There are a few other questions on Stack Overflow about this and I do understand that, but none of them are giving me an idea of why im getting the "Could not open input file".
I have it setup so I get an email everytime a crons runs (im using cPanal to set the crons) but all I get is:
Could not open input file: /home/methodjs/classified/emailNotifications.php
Because is the first time i'm using crons jobs I have no idea what this means or how fix it.
My command line is:
/usr/local/bin/php $HOME/classified/emailNotifications.php
Am I doing something wrong? Thanks for any help. By the way, i'm sure thats the right path to PHP because thats what I got from my host.
ensure file is located here:
/home/methodjs/classified/emailNotifications.php
try to execute from commandline:
/usr/local/bin/php /home/methodjs/classified/emailNotifications.php
what appears?
ensure your php file has execution rights
chmod 755 /home/methodjs/classified/emailNotifications.php
The error appears either file is not present at given path or proper permission are not set for file. It can be checked by navigating to path and ll for checking permission.
All,
This problem started occurring on all my 20 Kubuntu machines after an update from Ubuntu! Since Ubuntu is Debian based not sure if Debian or Ubuntu is to blame, so investigating!
Debian users, if this is also impacting you please reply so we can investigate further!
Cheers!

bash.exe - entry point not found

when trying to install cygwin, I keep getting this error message:
the entry point
rl_filename_rewrite_hook could not be
located in the dynamic link library
cygreadline7.dll
Has anyone seen this before ?
Thanks
I had the same error with cygwin1.dll. I checked in c:\cygwin\bin and noticed there were two files, cygwin1.dll and cygwin1.dll.new (possibly from a failed or aborted setup run?). The ".new" version was in fact newer (and slightly larger) than the existing cygwin1.dll, so I replaced cygwin1.dll with cygwin1.dll.new, and ran setup again. It completed with no errors.
First idea is to try reinstalling libreadline7 (or similarly named package) using the cygwin installer. Use the search field to enter readline to make it easier to find the right package.
Another option is that in the cygwin installer, change form Curr to Prev in order to switch to the previous-stable release. This means lots and lots of downloading and reinstalling. I anctually did manage to provoke my error into becoming a libreadline7 error, and switching to Prev at least got rid of the error messages. (Yay! Now bash, ssh server and git is working again! Back to work here then...)
Please check your path in WINDOWS (advanced system properties) environment. I found that C:\WinAVR\bin was coming before my cygwin path, so I moved that to the end, fixed my issue.
If you have multiple CYGWIN1.DLL files in your system, it definitely causes headaches if you're not careful.

Resources