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

x86_64 architecture #2

Closed
TurBoss opened this issue Nov 14, 2020 · 6 comments
Closed

x86_64 architecture #2

TurBoss opened this issue Nov 14, 2020 · 6 comments

Comments

@TurBoss
Copy link

TurBoss commented Nov 14, 2020

Hello,

does it require x86 or could be compiled on x86_64

Thanks

edit: add build log

➜  UnixNJE git:(master) ✗ LANG=C make
gcc -g -O2 -Wpacked -Wpadded -DUSG -DNBCONNECT -DNBSTREAM -DUSE_XMIT_QUEUE -DUNIX -DUSE_SOCKOPT -DSOCKBUFSIZE=8192 -DUSE_ENUM_TYPES -DDEBUG -DCONFIG_FILE='"/etc/funetnje/funetnje.cf"' -DPID_FILE='"/run/funetnje.pid"' -o funetnje.x main.o  headers.o  unix.o  file_queue.o	read_config.o io.o  nmr.o  unix_tcp.o  bcb_crc.o  unix_route.o util.o  protocol.o  send_file.o  recv_file.o logger.o unix_brdcst.o  unix_files.o gone_server.o detach.o libustr.o liblstr.o unix_msgs.o rscsacct.o version.o nmr_unix.o bintree.o __fopen.o  
/usr/bin/ld: headers.o:/home/turboss/Projetcs/MAINFRAME/UnixNJE/consts.h:136: multiple definition of `MAX_LINES'; main.o:/home/turboss/Projetcs/MAINFRAME/UnixNJE/consts.h:136: first defined here
/usr/bin/ld: unix.o:/home/turboss/Projetcs/MAINFRAME/UnixNJE/consts.h:136: multiple definition of `MAX_LINES'; main.o:/home/turboss/Projetcs/MAINFRAME/UnixNJE/consts.h:136: first defined here
/usr/bin/ld: file_queue.o:/home/turboss/Projetcs/MAINFRAME/UnixNJE/consts.h:136: multiple definition of `MAX_LINES'; main.o:/home/turboss/Projetcs/MAINFRAME/UnixNJE/consts.h:136: first defined here
/usr/bin/ld: read_config.o:/home/turboss/Projetcs/MAINFRAME/UnixNJE/consts.h:136: multiple definition of `MAX_LINES'; main.o:/home/turboss/Projetcs/MAINFRAME/UnixNJE/consts.h:136: first defined here
/usr/bin/ld: io.o:/home/turboss/Projetcs/MAINFRAME/UnixNJE/consts.h:136: multiple definition of `MAX_LINES'; main.o:/home/turboss/Projetcs/MAINFRAME/UnixNJE/consts.h:136: first defined here
/usr/bin/ld: nmr.o:/home/turboss/Projetcs/MAINFRAME/UnixNJE/consts.h:136: multiple definition of `MAX_LINES'; main.o:/home/turboss/Projetcs/MAINFRAME/UnixNJE/consts.h:136: first defined here
/usr/bin/ld: unix_tcp.o:/home/turboss/Projetcs/MAINFRAME/UnixNJE/consts.h:136: multiple definition of `MAX_LINES'; main.o:/home/turboss/Projetcs/MAINFRAME/UnixNJE/consts.h:136: first defined here
/usr/bin/ld: bcb_crc.o:/home/turboss/Projetcs/MAINFRAME/UnixNJE/consts.h:136: multiple definition of `MAX_LINES'; main.o:/home/turboss/Projetcs/MAINFRAME/UnixNJE/consts.h:136: first defined here
/usr/bin/ld: unix_route.o:/home/turboss/Projetcs/MAINFRAME/UnixNJE/consts.h:136: multiple definition of `MAX_LINES'; main.o:/home/turboss/Projetcs/MAINFRAME/UnixNJE/consts.h:136: first defined here
/usr/bin/ld: util.o:/home/turboss/Projetcs/MAINFRAME/UnixNJE/consts.h:136: multiple definition of `MAX_LINES'; main.o:/home/turboss/Projetcs/MAINFRAME/UnixNJE/consts.h:136: first defined here
/usr/bin/ld: protocol.o:/home/turboss/Projetcs/MAINFRAME/UnixNJE/consts.h:136: multiple definition of `MAX_LINES'; main.o:/home/turboss/Projetcs/MAINFRAME/UnixNJE/consts.h:136: first defined here
/usr/bin/ld: send_file.o:/home/turboss/Projetcs/MAINFRAME/UnixNJE/consts.h:136: multiple definition of `MAX_LINES'; main.o:/home/turboss/Projetcs/MAINFRAME/UnixNJE/consts.h:136: first defined here
/usr/bin/ld: recv_file.o:/home/turboss/Projetcs/MAINFRAME/UnixNJE/consts.h:136: multiple definition of `MAX_LINES'; main.o:/home/turboss/Projetcs/MAINFRAME/UnixNJE/consts.h:136: first defined here
/usr/bin/ld: logger.o:/home/turboss/Projetcs/MAINFRAME/UnixNJE/consts.h:136: multiple definition of `MAX_LINES'; main.o:/home/turboss/Projetcs/MAINFRAME/UnixNJE/consts.h:136: first defined here
/usr/bin/ld: unix_brdcst.o:/home/turboss/Projetcs/MAINFRAME/UnixNJE/consts.h:136: multiple definition of `MAX_LINES'; main.o:/home/turboss/Projetcs/MAINFRAME/UnixNJE/consts.h:136: first defined here
/usr/bin/ld: unix_files.o:/home/turboss/Projetcs/MAINFRAME/UnixNJE/consts.h:136: multiple definition of `MAX_LINES'; main.o:/home/turboss/Projetcs/MAINFRAME/UnixNJE/consts.h:136: first defined here
/usr/bin/ld: gone_server.o:/home/turboss/Projetcs/MAINFRAME/UnixNJE/consts.h:136: multiple definition of `MAX_LINES'; main.o:/home/turboss/Projetcs/MAINFRAME/UnixNJE/consts.h:136: first defined here
/usr/bin/ld: unix_msgs.o:/home/turboss/Projetcs/MAINFRAME/UnixNJE/consts.h:136: multiple definition of `MAX_LINES'; main.o:/home/turboss/Projetcs/MAINFRAME/UnixNJE/consts.h:136: first defined here
/usr/bin/ld: rscsacct.o:/home/turboss/Projetcs/MAINFRAME/UnixNJE/consts.h:136: multiple definition of `MAX_LINES'; main.o:/home/turboss/Projetcs/MAINFRAME/UnixNJE/consts.h:136: first defined here
/usr/bin/ld: nmr_unix.o:/home/turboss/Projetcs/MAINFRAME/UnixNJE/consts.h:136: multiple definition of `MAX_LINES'; main.o:/home/turboss/Projetcs/MAINFRAME/UnixNJE/consts.h:136: first defined here
/usr/bin/ld: unix_msgs.o: warning: relocation against `sys_nerr' in read-only section `.text'
/usr/bin/ld: unix.o: in function `init_command_mailbox':
/home/turboss/Projetcs/MAINFRAME/UnixNJE/unix.c:177: undefined reference to `sys_nerr'
/usr/bin/ld: /home/turboss/Projetcs/MAINFRAME/UnixNJE/unix.c:177: undefined reference to `sys_errlist'
/usr/bin/ld: /home/turboss/Projetcs/MAINFRAME/UnixNJE/unix.c:133: undefined reference to `sys_nerr'
/usr/bin/ld: /home/turboss/Projetcs/MAINFRAME/UnixNJE/unix.c:133: undefined reference to `sys_errlist'
/usr/bin/ld: /home/turboss/Projetcs/MAINFRAME/UnixNJE/unix.c:198: undefined reference to `sys_nerr'
/usr/bin/ld: /home/turboss/Projetcs/MAINFRAME/UnixNJE/unix.c:198: undefined reference to `sys_errlist'
/usr/bin/ld: /home/turboss/Projetcs/MAINFRAME/UnixNJE/unix.c:218: undefined reference to `sys_nerr'
/usr/bin/ld: /home/turboss/Projetcs/MAINFRAME/UnixNJE/unix.c:218: undefined reference to `sys_errlist'
/usr/bin/ld: /home/turboss/Projetcs/MAINFRAME/UnixNJE/unix.c:182: undefined reference to `sys_nerr'
/usr/bin/ld: /home/turboss/Projetcs/MAINFRAME/UnixNJE/unix.c:182: undefined reference to `sys_errlist'
/usr/bin/ld: unix.o: in function `poll_sockets':
/home/turboss/Projetcs/MAINFRAME/UnixNJE/unix.c:697: undefined reference to `sys_nerr'
/usr/bin/ld: /home/turboss/Projetcs/MAINFRAME/UnixNJE/unix.c:697: undefined reference to `sys_errlist'
/usr/bin/ld: unix.o: in function `parse_op_command':
/home/turboss/Projetcs/MAINFRAME/UnixNJE/unix.c:878: undefined reference to `sys_nerr'
/usr/bin/ld: /home/turboss/Projetcs/MAINFRAME/UnixNJE/unix.c:878: undefined reference to `sys_errlist'
/usr/bin/ld: unix.o: in function `find_file':
/home/turboss/Projetcs/MAINFRAME/UnixNJE/unix.c:1189: undefined reference to `sys_nerr'
/usr/bin/ld: /home/turboss/Projetcs/MAINFRAME/UnixNJE/unix.c:1189: undefined reference to `sys_errlist'
/usr/bin/ld: unix.o: in function `open_xmit_file':
/home/turboss/Projetcs/MAINFRAME/UnixNJE/unix.c:1249: undefined reference to `sys_nerr'
/usr/bin/ld: /home/turboss/Projetcs/MAINFRAME/UnixNJE/unix.c:1249: undefined reference to `sys_errlist'
/usr/bin/ld: unix.o: in function `open_recv_file':
/home/turboss/Projetcs/MAINFRAME/UnixNJE/unix.c:1306: undefined reference to `sys_nerr'
/usr/bin/ld: /home/turboss/Projetcs/MAINFRAME/UnixNJE/unix.c:1306: undefined reference to `sys_errlist'
/usr/bin/ld: unix.o: in function `uwrite':
/home/turboss/Projetcs/MAINFRAME/UnixNJE/unix.c:1339: undefined reference to `sys_nerr'
/usr/bin/ld: /home/turboss/Projetcs/MAINFRAME/UnixNJE/unix.c:1339: undefined reference to `sys_errlist'
/usr/bin/ld: unix.o: in function `uread':
/home/turboss/Projetcs/MAINFRAME/UnixNJE/unix.c:1383: undefined reference to `sys_nerr'
/usr/bin/ld: /home/turboss/Projetcs/MAINFRAME/UnixNJE/unix.c:1383: undefined reference to `sys_errlist'
/usr/bin/ld: unix.o: in function `delete_file':
/home/turboss/Projetcs/MAINFRAME/UnixNJE/unix.c:1419: undefined reference to `sys_nerr'
/usr/bin/ld: /home/turboss/Projetcs/MAINFRAME/UnixNJE/unix.c:1419: undefined reference to `sys_errlist'
/usr/bin/ld: /home/turboss/Projetcs/MAINFRAME/UnixNJE/unix.c:1416: undefined reference to `sys_nerr'
/usr/bin/ld: /home/turboss/Projetcs/MAINFRAME/UnixNJE/unix.c:1416: undefined reference to `sys_errlist'
/usr/bin/ld: unix.o: in function `close_file':
/home/turboss/Projetcs/MAINFRAME/UnixNJE/unix.c:1448: undefined reference to `sys_nerr'
/usr/bin/ld: /home/turboss/Projetcs/MAINFRAME/UnixNJE/unix.c:1448: undefined reference to `sys_nerr'
/usr/bin/ld: /home/turboss/Projetcs/MAINFRAME/UnixNJE/unix.c:1448: undefined reference to `sys_errlist'
/usr/bin/ld: unix.o: in function `get_file_size':
/home/turboss/Projetcs/MAINFRAME/UnixNJE/unix.c:1533: undefined reference to `sys_nerr'
/usr/bin/ld: /home/turboss/Projetcs/MAINFRAME/UnixNJE/unix.c:1533: undefined reference to `sys_errlist'
/usr/bin/ld: unix.o: in function `rename_file':
/home/turboss/Projetcs/MAINFRAME/UnixNJE/unix.c:1517: undefined reference to `sys_nerr'
/usr/bin/ld: /home/turboss/Projetcs/MAINFRAME/UnixNJE/unix.c:1517: undefined reference to `sys_errlist'
/usr/bin/ld: unix_tcp.o: in function `get_host_ip_address':
/home/turboss/Projetcs/MAINFRAME/UnixNJE/unix_tcp.c:1175: undefined reference to `sys_nerr'
/usr/bin/ld: /home/turboss/Projetcs/MAINFRAME/UnixNJE/unix_tcp.c:1175: undefined reference to `sys_errlist'
/usr/bin/ld: unix_tcp.o: in function `init_passive_tcp_connection':
/home/turboss/Projetcs/MAINFRAME/UnixNJE/unix_tcp.c:333: undefined reference to `sys_nerr'
/usr/bin/ld: /home/turboss/Projetcs/MAINFRAME/UnixNJE/unix_tcp.c:312: undefined reference to `sys_nerr'
/usr/bin/ld: /home/turboss/Projetcs/MAINFRAME/UnixNJE/unix_tcp.c:312: undefined reference to `sys_errlist'
/usr/bin/ld: /home/turboss/Projetcs/MAINFRAME/UnixNJE/unix_tcp.c:333: undefined reference to `sys_errlist'
/usr/bin/ld: /home/turboss/Projetcs/MAINFRAME/UnixNJE/unix_tcp.c:341: undefined reference to `sys_nerr'
/usr/bin/ld: /home/turboss/Projetcs/MAINFRAME/UnixNJE/unix_tcp.c:341: undefined reference to `sys_errlist'
/usr/bin/ld: unix_tcp.o: in function `accept_tcp_connection':
/home/turboss/Projetcs/MAINFRAME/UnixNJE/unix_tcp.c:363: undefined reference to `sys_nerr'
/usr/bin/ld: /home/turboss/Projetcs/MAINFRAME/UnixNJE/unix_tcp.c:363: undefined reference to `sys_errlist'
/usr/bin/ld: unix_tcp.o: in function `unix_tcp_receive':
/home/turboss/Projetcs/MAINFRAME/UnixNJE/unix_tcp.c:622: undefined reference to `sys_nerr'
/usr/bin/ld: /home/turboss/Projetcs/MAINFRAME/UnixNJE/unix_tcp.c:622: undefined reference to `sys_errlist'
/usr/bin/ld: unix_tcp.o: in function `tcp_partial_write':
/home/turboss/Projetcs/MAINFRAME/UnixNJE/unix_tcp.c:865: undefined reference to `sys_nerr'
/usr/bin/ld: /home/turboss/Projetcs/MAINFRAME/UnixNJE/unix_tcp.c:865: undefined reference to `sys_errlist'
/usr/bin/ld: unix_tcp.o: in function `init_active_tcp_connection':
/home/turboss/Projetcs/MAINFRAME/UnixNJE/unix_tcp.c:234: undefined reference to `sys_nerr'
/usr/bin/ld: /home/turboss/Projetcs/MAINFRAME/UnixNJE/unix_tcp.c:128: undefined reference to `sys_nerr'
/usr/bin/ld: /home/turboss/Projetcs/MAINFRAME/UnixNJE/unix_tcp.c:128: undefined reference to `sys_errlist'
/usr/bin/ld: /home/turboss/Projetcs/MAINFRAME/UnixNJE/unix_tcp.c:188: undefined reference to `sys_nerr'
/usr/bin/ld: /home/turboss/Projetcs/MAINFRAME/UnixNJE/unix_tcp.c:188: undefined reference to `sys_errlist'
/usr/bin/ld: /home/turboss/Projetcs/MAINFRAME/UnixNJE/unix_tcp.c:238: undefined reference to `sys_errlist'
/usr/bin/ld: /home/turboss/Projetcs/MAINFRAME/UnixNJE/unix_tcp.c:233: undefined reference to `sys_errlist'
/usr/bin/ld: unix_tcp.o: in function `read_passive_tcp_connection':
/home/turboss/Projetcs/MAINFRAME/UnixNJE/unix_tcp.c:430: undefined reference to `sys_nerr'
/usr/bin/ld: /home/turboss/Projetcs/MAINFRAME/UnixNJE/unix_tcp.c:430: undefined reference to `sys_errlist'
/usr/bin/ld: unix_route.o: in function `open_route_file':
/home/turboss/Projetcs/MAINFRAME/UnixNJE/unix_route.c:50: undefined reference to `sys_nerr'
/usr/bin/ld: /home/turboss/Projetcs/MAINFRAME/UnixNJE/unix_route.c:50: undefined reference to `sys_errlist'
/usr/bin/ld: unix_files.o: in function `_inform_filearrival':
/home/turboss/Projetcs/MAINFRAME/UnixNJE/unix_files.c:663: undefined reference to `sys_nerr'
/usr/bin/ld: /home/turboss/Projetcs/MAINFRAME/UnixNJE/unix_files.c:663: undefined reference to `sys_errlist'
/usr/bin/ld: unix_msgs.o: in function `msgcmd_run':
/home/turboss/Projetcs/MAINFRAME/UnixNJE/unix_msgs.c:388: undefined reference to `sys_nerr'
/usr/bin/ld: /home/turboss/Projetcs/MAINFRAME/UnixNJE/unix_msgs.c:388: undefined reference to `sys_errlist'
/usr/bin/ld: warning: creating DT_TEXTREL in a PIE
collect2: error: ld returned 1 exit status
make: *** [Makefile:426: funetnje] Error 1
➜  UnixNJE git:(master) ✗ 
@moshix
Copy link
Owner

moshix commented Nov 14, 2020

It does 64bit for sure, and I guess also 32bit, but I will have a look.

thanks

@moshix
Copy link
Owner

moshix commented Nov 14, 2020

what operating system do you have. I think you have a different file system layout than most modern Linuxes. It needs to find some standard libraries where sys_nerr is defined.

@moshix moshix pinned this issue Nov 14, 2020
@TurBoss
Copy link
Author

TurBoss commented Nov 14, 2020

Oh forgot to mention

my system is Arch Linux

@moshix
Copy link
Owner

moshix commented Nov 14, 2020

I found this which makes very much sense to me:

this
declaration in strerror.c (the libiberty version):

extern int sys_nerr;

This declaration overrides the declaration of sys_nerr in stdio.h,
where it is declared correctly as an imported variable (DATA).

__MINGW_IMPORT int _sys_nerr;

define sys_nerr _sys_nerr

The latest version of ld attempts to auto-resolve DATA symbols. That is
what
Warning: resolving __sys_nerr by linking to __imp___sys_nerr
is telling you.

However, this auto-import feature works only if the import lib was
built with an auto-import version of ld.

I think your ld is too new for this repo.

thanks

M

@TurBoss
Copy link
Author

TurBoss commented Nov 14, 2020

oh thanks

I'll try on a debian 10

@TurBoss
Copy link
Author

TurBoss commented Nov 15, 2020

I managed to compile on debian Thanks!
I was trying to run UnixNJE from my desktop to play
but I'll do it on the server that also hosts hercules 3.13
:-)

@TurBoss TurBoss closed this as completed Nov 15, 2020
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

2 participants