compiling xdebug on linux -> passing 32 bit option to ./configure - xdebug

Greetings!
When trying to compile xdebug, is there a way to pass it a 32-bit option?
What I have right now is this:
./configure --with-php-config=/opt/lampp/bin/php-config
... or is there a better way to obtain a 32-bit bin of xdebug?
Thaks

Old question, but had the same issue and I didn't want to install a 32 bit Linux distribution just for this.
This is what I did:
sudo aptitude install g++-multilib
CFLAGS=-m32 CPPFLAGS=-m32 CCASFLAGS=-m32 ./configure --with-php-config=/opt/lampp/bin/php-config
sudo cp modules/xdebug.so /opt/lampp/lib/php/extensions/
Source: http://montenasoft.com/en/blog/how-install-pecl-php-extension-64bit-linux-while-you-are-using-32bit-xampp

... never mind. Installed Vector Linux Light on VirtualBox, installed xampp with dev package on that and compiled xdebug against that. Then transfered xdebug.so into the proper xampp install and it worked like a charm.

Related

How can I run GCC into WSL?

So, Windows System on Linux seems to be an inovative light-weight substitute for a virtual machine, especially when it comes to learning Linux. Nevertheless, for me WSL seems to have a little more complicated organization from a VM when it comes to file management. For example, in WSL the data are stored in
C:\Users\<username>\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu20.04onWindows_79rhkp1fndgsc\LocalState\rootfs\usr\
as shown here.
Of course my first try to install GCC was to type in:
sudo apt install gcc
,but after typing
gcc --version
the output was :
Command 'gcc' not found, but can be installed with:
sudo apt install gcc
After that, I tried installing GCC using the following commands as shown here :
$ sudo apt-get update && sudo apt-get upgrade -y
$ sudo apt autoremove -y
$ sudo apt-get install gcc -y
but I end up getting the same output.
On the other hand, I already had installed TDM GCC on Windows and used sudo in VM to install it also there (successfully:).
Like a lot of people, I want to substitute the use of my virtual machine with WSL in order to be able to develop in C without overloading my RAM my questions are :
Can you count out for me how many times have I downloaded GCC files?
Why the folder that I was supposed to be downloading the gcc files in is shown to be empty?
Where are the downloaded files being stored?
How can get gcc fired up?
Is there any way to use the gcc I had on Windows to compile C using the WSL terminal?
I think these questions come from the fact that I cannot understand how WSL file system interacts with Windows. They are a bit more generic on purpose because I want you to have a lot of "answering" freedom.
Please help me out of this one! I don't want to be forced to use a virtual machine and run out of RAM almost every time!

Install arm-poky-linux-gnueabi toolchain on PC

There are 2 compilers used in IMX7(ARM Yocto Linux):
arm-poky-linux-gnueabi-gcc
arm-poky-linux-gnueabi-g++
When I build complete image by spending about 2 hours its already downloaded.
But I would like to know how to install this tool chain directly on PC(Ubuntu/CentOS) and use it as separate compiler in PC instead of with its Image as I mentioned above.
Use below command in your ubuntu pc
$ sudo apt-get install gcc-arm-linux-gnueabihf
$ sudo apt-get install g++-arm-linux-gnueabihf

simics installation libstdc++.so.6 version not found

I downloaded a tarball of simics from the web.
I tried to run the ./simics-gui
and I get this error
/home/leungtimothy/Desktop/simics/simics-4.0.60/amd64-linux/sys/lib/libstdc++.so.6: version `GLIBCXX_3.4.9' not found (required by /usr/lib/x86_64-linux-gnu/libproxy.so.1)
Failed to load module: /usr/lib/x86_64-linux-gnu/gio/modules/libgiolibproxy.so
I looked up a lot of posts, most of them are relate to linking problem. I am not able to find a libstdc++.so.6 on my 64 bits ubuntu v13.04 .
Any ideas about how to fix this?
Thank you so much
libstdc++ is the GNU Standard C++ library, which will be required by applications built with the GNU C++ compiler.
Evidently libstdc++6 is not installed on your system. It is typically installed by installing the GNU C++ compiler:
sudo apt-get install g++
If you don't need the compiler you can install libstdc++6 independently:
sudo apt-get install libstdc++6
I believe that Simics also ships with a few system libraries, that you can find in the installed base package (directory simics-<version>), at the path <host>/sys/lib/, where libstdc++.so.6 is one of them.
Looking at the path, it looks like it is Simics 4.0 which is over 8 years olds.
I suggest download and install the latest version of Simics from a proper source,
https://downloadcenter.intel.com/download/30403/Intel-Simics-Public-Release-Preview

How to install without make?

I am working with a BeagleBoard and I have already compiled ZMQ library with arm-linux-gnueabi gcc compiler. The problem is I don't know where to copy all that files because I don't have make command nor I am able to install it.
If I run:
uname -mrs
I get:
Linux 3.2.8-mg01.3 armv7l
Thanks in advance!
Build & install required library on your build machine:
./configure --prefix=/custom/location
make && make install
And then just copy /custom/location from your build machine to the target machine's root /.
You need to check that no stuff are being overwritten (or at least that no dependencies got lost).
Another, correct way, would be to create an installable package (i.e., deb or rpm), but that is a different question.

How to set up libusb on Mac OS X?

I'd like to try to make a user-space device driver using libusb on Mac, but I'm confused where to start. In the SDK installer (which I got from http://www.ellert.se/twain-sane) it said something about examples which I couldn't find anywhere on my computer.
Could anyone please describe how do I set up libusb for development on OS X? May I use Xcode? What should I include in my code?
brew install libusb-compat
Working on OSX Yosemite 10.10
Easiest way to do this:
brew install libusb
Homebrew is amazing and I recommend it for all developers that use Mac.
I tried to install the SDK from the aforementioned website and couldn't find a trace of it once the installer finished. Though I did find some libusb items at /usr/local/Developer/SDKs/MacOSX10.6.sdk/usr/local/ I'm not sure it came from that installer as I couldn't find any examples, just libraries and they were labeled as libusb0.1.4.
On the other hand, since you asked your question with the macports tag, I'd suggest you use that to install libusb as it at least puts everything in a known location:
/opt/local/var/macports/software for install files
/opt/local/lib for libraries
/opt/local/include for header files
If you've never used macports then once you have macports installed then you can install libusb using
sudo port install libusb
to install libusb1.0 or
sudo port install libusb-legacy
to install libusb0.1.12.
Then you can create a project in Xcode and link to the libusb-*.a library contained in /opt/local/lib (in my directory my library file is called libusb-1.0.a since I have libusb1.0 installed).
I don't have much experience using Xcode so I can't help you any further down this path. Personally what I've done so far is use a Python wrapper called pyusb to do some quick experimentation with libusb as I don't have to do IDE setup or library/include file setup with Python.
UPDATE: Poking around the macports install directory for libusb, I didn't find any examples included which was a bummer. If you've gotten this far then I'd suggest going directly to the source for libusb, download and unpack the tar file, and building the code that's in the example directory. Sorry for the roundabout way of getting libusb examples but I've really come to appreciate the organization macports imposes on installations which saves me quite a bit of future pain (like when I want to uninstall).
once libusb is installed using following command:
brew install libusb
or
brew install libusb-compat
link libusb to the build system using
brew link libusb
to be able to configure any project depending on libusb, use pkg-config:
pkg-config --cflags libusb-1.0
and
pkg-config --libs libusb-1.0
before calling any ./configure

Resources