I want to edit some code in cygwin1.dll for my project. So, I clone git repository from these two url:
https://github.com/mirror/newlib-cygwin.git
git://sourceware.org/git/newlib-cygwin.git
I've gcc, g++, make installed with cygwin and mingw-w64 (and also in WSL). But none of them generate DLL file. I also follow the commands ./configure & make. Command generates only object files. Is it possible to compile cygwin1.dll from its source code?
I had two different problems.
First, I followed the steps in cygwin FAQ: How do I build Cygwin on my own?. I forget to install mingww64_x86_64-gcc-g++ package. So, I installed those with the following commands:
setup-x86_64.exe -q -P gcc-g++ -P make -P perl -P cocom -P gettext-devel -P libiconv-devel -P zlib-devel
setup-x86_64.exe -q -P mingw64-x86_64-gcc-core -P mingw64-i686-gcc-g++ -P mingw64-i686-zlib
setup-x86_64.exe -q -P mingw64-x86_64-gcc-g++ -P mingw64-x86_64-zlib
Second, I logged the output from make command with make |& tee make.log. Thanks, #matzeri for the logging tip. Then I followed an error in make.log file as below:
../../.././winsup/cygwin/cygmagic: line 25: /usr/bin/awk: cannot
execute binary file: Exec format error
*** WARNING WARNING WARNING WARNING WARNING ***
*** ../../.././winsup/cygwin/child_info.h: magic number for
CHILD_INFO_MAGIC changed old 0xc96f5e9U != new
Somehow, the awk (hard linked with gawk) does not work in cygwin. So I installed awk package with setup-x86_64.exe. And now I can easily compile cygwin.dll.
Related
I am on a Mac so of course I'm running into this huge problem with perl on the Mac where the OS is trying to protect me and it's a nightmare to install . The solution seems to be "make your own perl instead of using the one with the OS" so I've done that. I ran brew install perl and now I have this in my .bashrc
PATH="/Users/ericmueller/perl5/bin${PATH:+:${PATH}}"; export PATH;
PERL5LIB="/Users/ericmueller/perl5/lib/perl5${PERL5LIB:+:${PERL5LIB}}"; export PERL5LIB;
PERL_LOCAL_LIB_ROOT="/Users/ericmueller/perl5${PERL_LOCAL_LIB_ROOT:+:${PERL_LOCAL_LIB_ROOT}}"; export PERL_LOCAL_LIB_ROOT;
PERL_MB_OPT="--install_base \"/Users/ericmueller/perl5\""; export PERL_MB_OPT;
PERL_MM_OPT="INSTALL_BASE=/Users/ericmueller/perl5"; export PERL_MM_OPT;
eval "$(perl -I$HOME/perl5/lib/perl5 -Mlocal::lib=$HOME/perl5)"
source ~/perl5/perlbrew/etc/bashrceval "$(perl -I$HOME/perl5/lib/perl5 -Mlocal::lib=$HOME/perl5)"
Honestly, I have no idea what most of this is ;-) but it looks like I have my own perl in my folder and I see that I can run simple perl scripts so I guess all is good.
So now I want to install cpanminus and DBI.
I installed cpanminus (brew install cpanminus), without errors. But then when I run cpanm DBI it fails, and when I look at the log where it failed, I see this:
"/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- DBI.bs blib/arch/auto/DBI/DBI.bs 644
"/usr/bin/perl" -p -e "s/~DRIVER~/Perl/g" ./Driver.xst > Perl.xsi
"/usr/bin/perl" "/System/Library/Perl/5.18/ExtUtils/xsubpp" -typemap '/System/Library/Perl/5.18/ExtUtils/typemap' -typemap '/Users/ericmueller/.cpanm/work/1555346710.17160/DBI-1.642/typemap' Perl.xs > Perl.xsc
mv Perl.xsc Perl.c
cc -c -g -pipe -fno-common -DPERL_DARWIN -fno-strict-aliasing -fstack-protector -Os -DVERSION=\"1.642\" -DXS_VERSION=\"1.642\" "-I/System/Library/Perl/5.18/darwin-thread-multi-2level/CORE" -W -Wall -Wpointer-arith -Wbad-function-cast -Wno-comment -Wno-sign-compare -Wno-cast-qual -Wmissing-noreturn -Wno-unused-parameter Perl.c
In file included from Perl.xs:7:
./DBIXS.h:22:10: fatal error: 'EXTERN.h' file not found
#include <EXTERN.h>
^~~~~~~~~~
1 error generated.
make: *** [Perl.o] Error 1
This is totally the stupid Mac perl problem, and the issue appears to be that it's still trying to put the DBI library (or one of its dependencies) in /usr/bin/ which is a big no-no. Or maybe it's trying to use the system perl to do the installation, so that's also failing. I have my own perl5 installation in my home folder. That's where it should be putting things and working with them.
So if that is the issue (and I am really shitty at both perl and this kind of sysadmin stuff, so I'm not 100% sure!), how do I get cpanm to work with my perl in my home folder, instead of in /usr/bin/? I don't want ANYTHING to happen in /usr/bin/ since that is a non-starter!
** EDIT I removed everything but the PATH command from my bashrc, and now I get this when I run cpanm DBI
!
! Can't write to /Library/Perl/5.18 and /usr/local/bin: Installing modules to /Users/ericmueller/perl5
! To turn off this warning, you have to do one of the following:
! - run me as a root or with --sudo option (to install to /Library/Perl/5.18 and /usr/local/bin)
! - Configure local::lib in your existing shell to set PERL_MM_OPT etc.
! - Install local::lib by running the following commands
!
! cpanm --local-lib=~/perl5 local::lib && eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib)
!
--> Working on DBI
Fetching http://www.cpan.org/authors/id/T/TI/TIMB/DBI-1.642.tar.gz ... OK
Configuring DBI-1.642 ... OK
Building and testing DBI-1.642 ... FAIL
! Installing DBI failed. See /Users/ericmueller/.cpanm/work/1555348167.22814/build.log for details. Retry with --force to force install it.
So the good news is that I am definitely using the cpanm that comes with my custom perl5 in my /Users folder. The bad news is, I'm still getting the exact same stupid problem.
yep ... MacOS Perl is something you should rather not touch.
yes ... You can do it.
but ... Common practice, https://perlbrew.pl
and ... Install some shinny perl
and ... follow the instructions on the website about cpanm
this is my first time using makefile to simplify my hybrid mobileapps developement. So, i have this pretty makefile which refuses to run after some commands. Please have a check.
.PHONY: run
OUTPUT_FILE=final.apk
ALIAS=mycert
KEYPASS=shittypass
KEYSTORE=certs/bang.keystore
UNSIGNED=platforms/android/build/outputs/apk/android-release-unsigned.apk
PACKAGE='com.example.testapp'
sign:
del -f ${OUTPUT_FILE}
cordova build android --release
jarsigner -verbose -sigalg MD5withRSA -digestalg SHA1 -keystore ${KEYSTORE} -storepass ${KEYPASS} ${UNSIGNED} ${ALIAS}
zipalign -v 4 ${UNSIGNED} ${OUTPUT_FILE}
execute:
adb shell am start -n ${PACKAGE}/${PACKAGE}.MainActivity
install:
adb install -r ${OUTPUT_FILE}
log:
adb logcat | grep `adb shell ps | grep ${PACKAGE} | cut -c10-15`
run: sign install execute log
The commands under "sign:" section are running perfectly but log: execute: and install: are not even showing in the cmd.
I am using Windows 7 and GnuWin32 make program.
make always tries to build only the first target in the makefile, unless you specify a specific target on the command line; for example you could invoke make sign install execute log and it would run them all.
It looks like you wanted the run target to be the default target when you type make; if so it must be the first target in the makefile not the last one.
Also, you should not be indenting the log and run targets like you do in your example above. It's confusing at best and an error at worst.
Hey friends i had installed Omnet++ 4.2.2 and Castalia 3.2.I had tried to run the example simulations,but it saying an run time error.i had attached it as a image.Please help me.Please tell me the solutions.Help indeed please.
You probably didn't build the Castalia. In order to build it under Windows do the following:
Open in any text editor the file makemake from main Castalia-3.2 directory, and change the line: OPTS=" -f -r --deep -o CastaliaBin -u Cmdenv -P $ROOT -M release" into:
OPTS=" -f -r --deep -P $ROOT -M release"
Open console mingwenv.cmd.
Change directory to the Castalia directory. Example: assuming that Castalia-3.2 is in d:\Castalia-3.2 you should type: cd /d/Castalia-3.2
Then type in mingwcmd console:
./makemake
make
In order to check it try to start a simulation by typing in console:
cd Simulations/BANtest/
../../Castalia-3.2.exe
The simulation should start in graphical mode.
In qemu I use below command to install tools such as qemu-ga.exe,
but the problem is libtool does not accept its directory argument correctly.
If I run the command like this,
msdperera#msdperera-PC MSYS /qemu
$ libtool --quiet --mode=install install -c -m 0755 qemu-ga.exe qemu-img.exe qemu-io.exe "/c:/Program Files/QEMU"
install: target 'Files/QEMU/qemu-ga.exe' is not a directory
what is the correct format for the directory argument?
Here is my case:
I am using Ubuntu 10.04 (Lucid Lynx). The system's default Python is v2.6.5, but I need Python v2.7. So I downloaded the source from python.org and tried to install it.
The first time I installed it, I ran:
cd Python2.7.4
./configure --prefix=/usr
make
su root
make install
This installs Python 2.7 to my system. It will create a link, "python", in /usr/bin linking to python2.7 also in /usr/bin. So when I type >python, the system will start Python 2.7.4 for me just like when I type >python2.7.
But when I install this way:
cd Python2.7.4
./configure --prefix=/usr
make
su root
make altinstall
The link "python" in /usr/bin still exists and links to python2.6 which is the default system version. Of course, I can remove it and create a new soft link linking to python2.7.
What is the difference between the command "make install" and "make altinstall", except for the link in /usr/bin?
Let's take a look at the generated Makefile!
First, the install target:
install: altinstall bininstall maninstall
It does everything altinstall does, along with bininstall and maninstall
Here's bininstall; it just creates the python and other symbolic links.
# Install the interpreter by creating a symlink chain:
# $(PYTHON) -> python2 -> python$(VERSION))
# Also create equivalent chains for other installed files
bininstall: altbininstall
-if test -f $(DESTDIR)$(BINDIR)/$(PYTHON) -o -h $(DESTDIR)$(BINDIR)/$(PYTHON); \
then rm -f $(DESTDIR)$(BINDIR)/$(PYTHON); \
else true; \
fi
(cd $(DESTDIR)$(BINDIR); $(LN) -s python2$(EXE) $(PYTHON))
-rm -f $(DESTDIR)$(BINDIR)/python2$(EXE)
(cd $(DESTDIR)$(BINDIR); $(LN) -s python$(VERSION)$(EXE) python2$(EXE))
... (More links created)
And here's maninstall, it just creates "unversioned" links to the Python manual pages.
# Install the unversioned manual pages
maninstall: altmaninstall
-rm -f $(DESTDIR)$(MANDIR)/man1/python2.1
(cd $(DESTDIR)$(MANDIR)/man1; $(LN) -s python$(VERSION).1 python2.1)
-rm -f $(DESTDIR)$(MANDIR)/man1/python.1
(cd $(DESTDIR)$(MANDIR)/man1; $(LN) -s python2.1 python.1)
TLDR: altinstall skips creating the python link and the manual pages links, install will hide the system binaries and manual pages.
Simply: The altinstall target will make sure the default Python on your machine is not touched, or to avoid overwriting the system Python.