I'm using InstallJammer to build cross-platform installers for my application (Windows, Linux & Mac). However, InstallJammer development has been discontinued and the official forum is now closed.
I need to build the installkit for Windows, because I'll have to make some changes to the Windows install manifest, in order to add Windows 7 support (otherwise the installer displays the message "This program might not have installed correctly").
I grabbed the latest installkit sources from here: http://sourceforge.net/projects/installjammer/files/installkit/1.2.15/installkit-1.2.15.tar.gz/download
I found this topic http://www.installjammer.com/forums/viewtopic.php?f=3&p=9258 which helped me get started.
I grabbed latest version of MinGW and typed ./configure && make. It started the build process, but there was this error while trying to compile TCL:
c:/installkit-1.2.15/src/tcl/win/tclWinReg.c:750:29: error: lvalue required as increment operand
Since these sources are kind of old, I figured I should try with an older GCC version (I was using 4.7.2). So I downgraded MinGW's GCC to version 3.4.5 and tried again.
This time, TCL built fine. Everything was going well, until it failed to build something called 'miniarc' (I don't know what it is), with the following error message:
miniarc.o:miniarc.c:(.text+0x370c): undefined reference to `_imp__strtoull'
miniarc.o:miniarc.c:(.text+0x37c9): undefined reference to `_imp__strtoull'
miniarc.o:miniarc.c:(.text+0x3cb6): undefined reference to `_imp__strtoull'
miniarc.o:miniarc.c:(.text+0x3e78): undefined reference to `_imp__strtoull'
miniarc.o:miniarc.c:(.text+0x3e9f): undefined reference to `_imp__strtoull'
miniarc.o:miniarc.c:(.text+0x3ff5): more undefined references to `_imp__strtoull' follow
collect2: ld returned 1 exit status
Strange thing is that there's no reference to imp_strtoull inside miniarc.c.
Moving on, I tried to build it in Ubuntu, since I didn't know what else to do, and it worked! GCC version was 4.4.3. So I went and searched for GCC 4.4.3 for MinGW, but the closest version was 4.4.0. I grabbed these and tried again. Same tcl build error (regarding tclWinReg.c).
Then I went back to GCC 4.7.2 and replaced TCL & TK sources (8.4) with the latest ones (8.5) and tried again.
TCL and TK both built fine, and so did some other libs, but when it came to 'miniarc', it failed again. This time with a different error:
undefined reference to `TclIncrVar2'
Apparently, this function no longer exists in TCL 8.5.
So, I'm out of ideas. I even tried emailing the original (and only) InstallJammer developer, but still got no answer (I don't even know if his email is the same).
Does anyone have any suggestions?
EDIT: I should add that I have very little experience with Makefiles and the last time I coded in C was 8 years ago in college. So, I apologize if there is something obvious about all this that I didn't notice.
I don't like the solution, but here's how I got it working:
Using GCC 3.4.5, I started the make process by typing ./configure && make;
The make process stops with an error (mentioned above) when it reaches 'miniarc';
Then, manually, I built a DLL (strtoull.dll) from file strtoull.o (below is the exact command-line I typed);
gcc -pipe -shared -o strtoull.dll strtoull.o -lz -L/c/installkit-1.2.15/Windows/lib /c/installkit-1.2.15/Windows/lib/libtclstub84s.a"
After that, I copied strtoull.dll to miniarc/build and to windows/system32;
Then I entered folder miniarc/build and typed:
gcc -pipe -shared -o miniarc01.dll miniarc.o sha1.o md5.o -lz -L/c/installkit-1.2.15/Windows/lib "/c/installkit-1.2.15/Windows/lib/libtclstub84s.a" strtoull.dll
Finally, I typed make again so it could continue building the rest of the stuff.
Related
I'm a beginner at Fortran code. I install gfortran from the homebrew to my apple silicon mac. The path show in the terminal when I type which fortran is /opt/homebrew/bin/gfortran
I try to use bash shell to run a 'hello world' fortran file on the Desktop (.f90 file). I typed the following command in the terminal. gfortran prog01_01.f90. But it does not work. The error says: ld: library not found for -lm and collect2: error: ld returned 1 exit status. I have no idea how to deal with this problem.
Can anyone please help me this out?
This means that the compiler cannot find the basic mathematical library libm. It should normally be included in your GLIBC or other standard C library installation and be available in the appropriate library directories and I would expect that your package manager would complain that something is missing.
Anyway, you simply have to fix your software installation, we cannot tell you more without details about your system and your software packages. You can try to install GLIBC if you did not install it yet.
I am trying to install a program and when I run make or make -f Makefile (following the installation instructions) I get the following output:
g77 -O5 -Wall -c prep_output.f -o prep_output.o
dyld: Symbol not found: ___keymgr_global
Referenced from: /usr/local/bin/g77
Expected in: /usr/lib/libSystem.B.dylib
make: *** [prep_output.o] Abort trap: 6
I am working on a macOS Mojave 10.14.6. Following some other proposed solutions in similar problems, I've already installed Command line tools in my Xcode but that didn't do the trick. Any suggestions please??
Thanks in advance
EDIT:
I got rid of g77 and installed a compatible version of gcc (gcc8) through MacPorts. After running the make command I get the following:
g77 -O5 -Wall -c prep_output.f -o prep_output.o
make: g77: No such file or directory
make: *** [prep_output.o] Error 1
So I guess the program still needs the g77 setup? This is the program btw ([http://www.cfht.hawaii.edu/~arnouts/LEPHARE/install.html]). Is there a way to rely to the gfortran compiler for building the program?
Thanks in advance
P.S. I noticed that when I install g77 I get the following error:
x usr/local/: Can't set user=0/group=0 for usr/local`
`tar: Error exit delayed from previous errors.
However it still installs g77..
The error message indicates that your installation of g77 is broken. This has nothing to do with make or the particular project you're trying to build, except inasmuch as the project is trying to use g77 in the first place. That is a bit surprising, actually, since g77 has been obsolete for years (gfortran is the current GNU Fortran compiler), but I'm uncertain what exactly to expect from XCode in this area.
On the other hand, since the full path to the binary is /usr/local/bin/g77, I'm further inclined to think that you're not using XCode for this at all. Possibly you've dumped a g77 built on some other system into your /usr/local/bin, and it's not compatible with your Mojave system.
Your best bet is probably to
Get rid of your broken g77 installation.
Install Fink or MacPorts, or a similar project.
Install the Fink / MacPorts / whatever package for gfortran (maybe gcc-gfortran or similar in some of those) to get a working Fortran compiler.
Rely on that compiler to build your project.
I have trouble making Clang work with MinGW on Windows.
I have MinGW-W64-builds-4.3.3 installed (GCC 7.2.0) as well as the newest Clang/LLVM (by installer on the website).
I am compiling with:
-target x86_64-pc-windows-gnu
option and Clang finds all the headers. Unfortunately there is an error from the linker when I am using OpenMP. It looks like this:
: undefined reference to `__imp___kmpc_fork_call'
\libgomp.a(team.o):(.text+0x19): undefined reference to `pthread_mutex_destroy'
...
When I try to use -fopenmp=libomp flag I am getting errors like this:
...: undefined reference to `__imp___kmpc_fork_call'
...: undefined reference to `__imp___kmpc_for_static_init_4'
...: undefined reference to `__imp___kmpc_for_static_fini'
...: undefined reference to `__imp___kmpc_barrier'
...
It all works without problems when compiling with GCC.
Is there a way to make it (openmp) work without Visual Studio installed? If no, is there some minimilastic Visual Studio installer which just pulls needed libraries/headers and not the whole IDE etc.?
I surely don't know what I am doing here. Explain like I am five answers are very appreciated.
What solved the issue for me was adding libomp.lib to the list of files to compile. This seems to be necessary no matter if I have -static in compiler options and no matter if it's:
-fopenmp=libomp
or
-fopenmp=libiomp5
(as the commenter suggested)
Summing things up, I needed:
clang --target x86_64-pc-windows-gnu -fopenmp=libomp ... C:\FULL\PATH\TO\libomp.lib
To make it work with MinGW-W64-builds-4.3.3 and Clang 5.0.1
I mostly work on linux and have no problems but want to occasionally use a Mac for work. Somehow gfortran does not work there, though. I installed it as instructed but when I try to compile something, this happens:
gfortran -o m_g_matrix2.x m_g_matrix.f90
ld: entry point (start) undefined. Usually in crt1.o for architecture x86_64
collect2: error: ld returned 1 exit status
I have no idea what this means and google search did not help. Did someone manage to get gfortran to work on Mac?
Thanks for the help!
I installed gcc binaries for yosemite from http://hpc.sourceforge.net
and also installed Xcode command-line tools as directed there.
gcc contains the gfortran compiler.
Seems to work well on macbook air with Yosemite.
JTN
TLDR: Getting fatal error 'failed to get process times' on cross-native build of gcc. Can I remove report_times code from gcc.c OR use gcc command line option to disable report_times OR build gcc without libiberty (which contains pex_get_times used by report_times
DETAIL
After beating my head against various problems I've (finally) successfully used the Android NDK standalone toolchain to build binutils 2.23 and gcc 4.70.
My current problem is getting it to run on my device.
I've written a standard 'hello world' (copied from here) to test gcc on my device. When I run:
arm-linux-eabi-gcc hello.c -o hello
or:
arm-linux-eabi-gcc hello.c
I get the following error:
arm-linux-eabi-gcc: fatal error: failed to get process times: No such file or directory.
Google did not return much except for links to gcc.c source. Examining the source, I found the error in a function (module? extension?) called report_times. The error is returned by the function (module? extension?) pex_get_times....I'm guessing it does so if it can't get the process times.
The pex_get_times function (module? extension? I'm not sure what it is) is defined in libiberty. I can use --disable-build-libiberty, but it doesn't help for the host (my NookHD) gcc build.
My question(s):
Can this portion of gcc.c be safely (and easily) removed...i.e. the report_times function and everything associated with it?
or
Is there a command line option to tell arm-linux-eabi-gcc NOT to use report_times?
or
Is there a way to disable build of libiberty for host/target for both gcc and binutils, and would that fix the error?
As always...I'll keep researching while awaiting an answer.
Found this about an hour after posting this question. Maybe two.
Apparently report_times is part of debugging symbols (?) for GCC. To exclude report_times (which causes the 'failed to get process times' from the original question) you have to build the non-debug...or release...version of gcc.
To do this, I used info from this link: http://www-gpsg.mit.edu/~simon/gcc_g77_install/build.html
BUT, I omitted the -g from the LIBCXXFLAGS and LIBCFLAGS and I added LIBCPPFLAGS without -g just in case. Ran make DESTDIR=/staging/install/path install-host, tarballed and transferred to device. No more 'failed to get process times' error.
I am seeing another error, but it is not related to this question