Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

programs are not linked on openbsd #45

Closed
wildstray opened this issue May 18, 2015 · 3 comments
Closed

programs are not linked on openbsd #45

wildstray opened this issue May 18, 2015 · 3 comments

Comments

@wildstray
Copy link

make compiles .o and generate libraries, but programs are not linked. it seems a Makefile issue.
uname -a
OpenBSD devbsd.my.domain 5.7 GENERIC#738 i386

make install
gcc -Wall -Wextra -Wno-unused-parameter -DMAKEFILE -D__GETOPT_H__ -D_GETOPT_DEFINED_ -c efbu.c
gcc -Wall -Wextra -Wno-unused-parameter -DMAKEFILE -D__GETOPT_H__ -D_GETOPT_DEFINED_ -c ../tools/getoptv.c
gcc -Wall -Wextra -Wno-unused-parameter -DMAKEFILE -D__GETOPT_H__ -D_GETOPT_DEFINED_ -c ../tools/error.c
gcc -Wall -Wextra -Wno-unused-parameter -DMAKEFILE -D__GETOPT_H__ -D_GETOPT_DEFINED_ -c ../tools/hexencode.c
gcc -Wall -Wextra -Wno-unused-parameter -DMAKEFILE -D__GETOPT_H__ -D_GETOPT_DEFINED_ -c ../tools/uintspec.c
gcc -Wall -Wextra -Wno-unused-parameter -DMAKEFILE -D__GETOPT_H__ -D_GETOPT_DEFINED_ -c ../tools/hexdump.c
gcc -Wall -Wextra -Wno-unused-parameter -DMAKEFILE -D__GETOPT_H__ -D_GETOPT_DEFINED_ -c openchannel.c
gcc -Wall -Wextra -Wno-unused-parameter -DMAKEFILE -D__GETOPT_H__ -D_GETOPT_DEFINED_ -c sendpacket.c
gcc -Wall -Wextra -Wno-unused-parameter -DMAKEFILE -D__GETOPT_H__ -D_GETOPT_DEFINED_ -c readpacket.c
gcc -Wall -Wextra -Wno-unused-parameter -DMAKEFILE -D__GETOPT_H__ -D_GETOPT_DEFINED_ -c ../tools/basespec.c
gcc -Wall -Wextra -Wno-unused-parameter -DMAKEFILE -D__GETOPT_H__ -D_GETOPT_DEFINED_ -c efeu.c
gcc -Wall -Wextra -Wno-unused-parameter -DMAKEFILE -D__GETOPT_H__ -D_GETOPT_DEFINED_ -c ../tools/memswap.c
gcc -Wall -Wextra -Wno-unused-parameter -DMAKEFILE -D__GETOPT_H__ -D_GETOPT_DEFINED_ -c efru.c
gcc -Wall -Wextra -Wno-unused-parameter -DMAKEFILE -D__GETOPT_H__ -D_GETOPT_DEFINED_ -c efsu.c
gcc -Wall -Wextra -Wno-unused-parameter -DMAKEFILE -D__GETOPT_H__ -D_GETOPT_DEFINED_ -c ../tools/hexload.c
gcc -Wall -Wextra -Wno-unused-parameter -DMAKEFILE -D__GETOPT_H__ -D_GETOPT_DEFINED_ -c edru.c
gcc -Wall -Wextra -Wno-unused-parameter -DMAKEFILE -D__GETOPT_H__ -D_GETOPT_DEFINED_ -c ../tools/hexdecode.c
gcc -Wall -Wextra -Wno-unused-parameter -DMAKEFILE -D__GETOPT_H__ -D_GETOPT_DEFINED_ -c ../tools/hexstring.c
gcc -Wall -Wextra -Wno-unused-parameter -DMAKEFILE -D__GETOPT_H__ -D_GETOPT_DEFINED_ -c edsu.c
gcc -Wall -Wextra -Wno-unused-parameter -DMAKEFILE -D__GETOPT_H__ -D_GETOPT_DEFINED_ -c ../tools/efreopen.c
gcc -Wall -Wextra -Wno-unused-parameter -DMAKEFILE -D__GETOPT_H__ -D_GETOPT_DEFINED_ -c nics.c
gcc -Wall -Wextra -Wno-unused-parameter -DMAKEFILE -D__GETOPT_H__ -D_GETOPT_DEFINED_ -c ../tools/decdecode.c
gcc -Wall -Wextra -Wno-unused-parameter -DMAKEFILE -D__GETOPT_H__ -D_GETOPT_DEFINED_ -c ../tools/decstring.c
install -m 0755 -o 0 -g 0 -d /usr/local/bin
install -m 4555 -o 0 -g 0 efbu efeu efru efsu edru edsu nics /usr/local/bin
install: efbu: No such file or directory
*** Error 71 in ether (Makefile:36 'install')
*** Error 1 in /root/open-plc-utils-master (Makefile:29 'install')

@wildstray
Copy link
Author

ls -al ether
total 684
drwxr-xr-x 2 root wheel 2048 May 18 13:55 .
drwxr-xr-x 19 root wheel 512 Apr 24 05:10 ..
-rw-r--r-- 1 root wheel 35 Apr 24 05:10 .gitignore
-rw-r--r-- 1 root wheel 4485 Apr 24 05:10 IGMP.hex
-rw-r--r-- 1 root wheel 569 Apr 24 05:10 IGMP_JOIN.hex
-rw-r--r-- 1 root wheel 573 Apr 24 05:10 IGMP_LEAVE.hex
-rw-r--r-- 1 root wheel 1107 Apr 24 05:10 IGMP_QUERY.hex
-rwxr-xr-x 1 root wheel 3420 Apr 24 05:10 Makefile
-rw-r--r-- 1 root wheel 4868 Apr 24 05:10 SMB.hex
-rw-r--r-- 1 root wheel 510 Apr 24 05:10 SMB_ACK.hex
-rw-r--r-- 1 root wheel 4868 Apr 24 05:10 TCP.hex
-rw-r--r-- 1 root wheel 522 Apr 24 05:10 TCP_ACK.hex
-rw-r--r-- 1 root wheel 4733 Apr 24 05:10 UDP.hex
-rw-r--r-- 1 root wheel 1612 May 18 13:54 basespec.o
-rw-r--r-- 1 root wheel 3124 Apr 24 05:10 channel.c
-rw-r--r-- 1 root wheel 7050 Apr 24 05:10 channel.h
-rw-r--r-- 1 root wheel 740 May 18 06:28 channel.o
-rw-r--r-- 1 root wheel 2893 Apr 24 05:10 closechannel.c
-rw-r--r-- 1 root wheel 876 May 18 06:29 closechannel.o
-rw-r--r-- 1 root wheel 731 May 18 13:55 decdecode.o
-rw-r--r-- 1 root wheel 828 May 18 13:55 decstring.o
-rwxr-xr-x 1 root wheel 3102 Apr 24 05:10 edru.1
-rw-r--r-- 1 root wheel 6658 Apr 24 05:10 edru.c
-rw-r--r-- 1 root wheel 2940 May 18 13:55 edru.o
-rwxr-xr-x 1 root wheel 3440 Apr 24 05:10 edsu.1
-rw-r--r-- 1 root wheel 7335 Apr 24 05:10 edsu.c
-rw-r--r-- 1 root wheel 3820 May 18 13:55 edsu.o
-rwxr-xr-x 1 root wheel 10950 Apr 24 05:10 efbu.1
-rw-r--r-- 1 root wheel 8430 Apr 24 05:10 efbu.c
-rw-r--r-- 1 root wheel 4492 May 18 13:54 efbu.o
-rwxr-xr-x 1 root wheel 3510 Apr 24 05:10 efeu.1
-rw-r--r-- 1 root wheel 6769 Apr 24 05:10 efeu.c
-rw-r--r-- 1 root wheel 3136 May 18 13:54 efeu.o
-rw-r--r-- 1 root wheel 1004 May 18 13:55 efreopen.o
-rwxr-xr-x 1 root wheel 3509 Apr 24 05:10 efru.1
-rw-r--r-- 1 root wheel 6577 Apr 24 05:10 efru.c
-rw-r--r-- 1 root wheel 2904 May 18 13:54 efru.o
-rwxr-xr-x 1 root wheel 7458 Apr 24 05:10 efsu.1
-rw-r--r-- 1 root wheel 9695 Apr 24 05:10 efsu.c
-rw-r--r-- 1 root wheel 4912 May 18 13:55 efsu.o
-rw-r--r-- 1 root wheel 1548 May 18 13:54 error.o
-rw-r--r-- 1 root wheel 3396 Apr 24 05:10 ether.h
-rwxr-xr-x 1 root wheel 1989 Apr 24 05:10 ether.mak
-rwxr-xr-x 1 root wheel 2046 Apr 24 05:10 ether.sh
-rw-r--r-- 1 root wheel 9492 Apr 24 05:10 fcs.c
-rw-r--r-- 1 root wheel 684 Apr 24 05:10 frame.hex
-rw-r--r-- 1 root wheel 6001 Apr 24 05:10 gethwaddr.c
-rw-r--r-- 1 root wheel 3388 Apr 24 05:10 getifname.c
-rw-r--r-- 1 root wheel 3476 May 18 13:54 getoptv.o
-rw-r--r-- 1 root wheel 1024 May 18 13:55 hexdecode.o
-rw-r--r-- 1 root wheel 1652 May 18 13:54 hexdump.o
-rw-r--r-- 1 root wheel 1064 May 18 13:54 hexencode.o
-rw-r--r-- 1 root wheel 2076 May 18 13:55 hexload.o
-rw-r--r-- 1 root wheel 828 May 18 13:55 hexstring.o
-rw-r--r-- 1 root wheel 6601 Apr 24 05:10 hostnics.c
-rw-r--r-- 1 root wheel 1596 May 18 06:29 hostnics.o
-rw-r--r-- 1 root wheel 571 May 18 13:54 memswap.o
-rwxr-xr-x 1 root wheel 1710 Apr 24 05:10 nics.1
-rw-r--r-- 1 root wheel 5102 Apr 24 05:10 nics.c
-rw-r--r-- 1 root wheel 2260 May 18 13:55 nics.o
-rw-r--r-- 1 root wheel 395 Apr 24 05:10 oddbytes.hex
-rw-r--r-- 1 root wheel 11085 Apr 24 05:10 openchannel.c
-rw-r--r-- 1 root wheel 3932 May 18 13:54 openchannel.o
-rw-r--r-- 1 root wheel 2785 Apr 24 05:10 pcap_freenameindex.c
-rw-r--r-- 1 root wheel 3231 Apr 24 05:10 pcap_indextoname.c
-rw-r--r-- 1 root wheel 3358 Apr 24 05:10 pcap_nameindex.c
-rw-r--r-- 1 root wheel 3151 Apr 24 05:10 pcap_nametoindex.c
-rwxr-xr-x 1 root wheel 4594 Apr 24 05:10 pcapdevs.1
-rw-r--r-- 1 root wheel 6729 Apr 24 05:10 pcapdevs.c
-rw-r--r-- 1 root wheel 1054 Apr 24 05:10 poem.hex
-rw-r--r-- 1 root wheel 1384 May 18 06:28 putoptv.o
-rw-r--r-- 1 root wheel 5721 Apr 24 05:10 readpacket.c
-rw-r--r-- 1 root wheel 1580 May 18 13:54 readpacket.o
-rw-r--r-- 1 root wheel 3298 Apr 24 05:10 sendpacket.c
-rw-r--r-- 1 root wheel 940 May 18 13:54 sendpacket.o
-rw-r--r-- 1 root wheel 904 May 18 06:29 synonym.o
-rw-r--r-- 1 root wheel 579 May 18 06:28 todigit.o
-rw-r--r-- 1 root wheel 4772 Apr 24 05:10 toobig.hex
-rw-r--r-- 1 root wheel 401 Apr 24 05:10 toosmall.hex
-rw-r--r-- 1 root wheel 1396 May 18 13:54 uintspec.o
-rw-r--r-- 1 root wheel 1228 May 18 06:28 version.o

@wildstray
Copy link
Author

it seems that GNU make and BSD make require different Makefiles... programs are not automatically linked by BSD make...
http://www.wgdd.de/2007/11/gnu-make-vs-bsd-make-practical-problem.html

@wildstray
Copy link
Author

Ok, the simplest solution is to use gmake.
pkg_add gmake
gmake
gmake install

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant