Free Downloads, Community Forum,
FAQs and Developer Resources


Make /Tools Your Home | Link to us

Today's posts | Posts since last visit | Most Active Topics

All Forums Register Login Search Subscriptions My Profile Inbox
Tool Warehouse FAQs Resources Help Member List Address Book Logout

Building vim 6.2 native for Interix

 
Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [SFU / Interix / SUA Technology] >> Tools Discussion Forum >> Building vim 6.2 native for Interix Page: [1]
Login
Message << Older Topic   Newer Topic >>
Building vim 6.2 native for Interix - Jan. 22, '04, 7:46:22 PM   
Roger_Telco

 

Posts: 31
Joined: Jan. 22, '04,
Status: offline
Hello,

I' ve been trying to get vim 6.2 to compile on Interix/SFU 3.5 without much luck. I' ve tried the CFLAGS and CXXFLAGS tips suggested in the white paper elsewhere on this site. The ./configure seems to work, but the compiler gets stuck when running make afterwards.

Any free advice?

Here' s my ./configure command line:

CFLAGS=" -D_ALL_SOURCE" CXXFLAGS=" -D_ALL_SOURCE" ./configure --disable-gui --prefix=/usr/local --host=intel-pclocal-interix

and here' s the " make" error:

Starting make in the src directory.
If there are problems, cd to the src directory and run make there
cd src && make first
CC=" gcc -Iproto -DHAVE_CONFIG_H -I/usr/local/include -D_ALL_SOURCE -I/usr/X11R6/include " srcdir=. sh ./osdef.sh
gcc -c -I. -Iproto -DHAVE_CONFIG_H -I/usr/local/include -D_ALL_SOURCE -I/usr/X11R6/include -o objects/buffer.o buffer.c
In file included from os_unix.h:160,
from vim.h:186,
from buffer.c:29:
/usr/include/signal.h:167: error: two types specified in one empty declaration
*** Error code 1
Stop.
*** Error code 1
Stop.

I know there' s a win32 port of vim (I use it all the time in " real" Windows), but it would be great to have it included as one of your standard repository packages.
Post #: 1
RE: Building vim 6.2 native for Interix - Jan. 24, '04, 2:49:01 AM   
Rodney

 

Posts: 3729
Joined: Jul. 9, '02,
From: /Tools lab
Status: online
Mark ported vim Friday afternoon with a problem. I believe all you had to do was set the env vars CFLAGS and CPPFLAGS. Charlie from the SFU newsgroup is an avid (dare we be rabid ;-) ) vim user who was at LinuxWorld when Mark did the port. So a knowledgable tester was at hand to give it a whirl and it worked fine.
Mark has mentioned that he' s going to package it up for posting into the /Tools warehouse.

(in reply to Roger_Telco)
Post #: 2
RE: Building vim 6.2 native for Interix - Jan. 24, '04, 4:05:43 AM   
Roger_Telco

 

Posts: 31
Joined: Jan. 22, '04,
Status: offline
This is great news!! Many, many thanks to all three of you.

(in reply to Roger_Telco)
Post #: 3
RE: Building vim 6.2 native for Interix - Jan. 24, '04, 1:14:18 PM   
Rodney

 

Posts: 3729
Joined: Jul. 9, '02,
From: /Tools lab
Status: online
I should have written " without a problem" before.

(in reply to Roger_Telco)
Post #: 4
RE: Building vim 6.2 native for Interix - Jan. 25, '04, 4:33:45 PM   
markfunk

 

Posts: 673
Joined: Mar. 31, '03,
Status: offline
To build vim 6.2 yourself, using Interix/SFU 3.5, all you need to do is:

$ cd <the directory where you unpacked the vim6.2 sources>
$ cd src
$ ./configure
$ make

(in reply to Roger_Telco)
Post #: 5
RE: Building vim 6.2 native for Interix - Jan. 25, '04, 4:37:49 PM   
crussel

 

Posts: 4
Joined: Feb. 24, '03,
Status: offline
Yes, I was at LinuxWorld, as were both Rodney and Mark, and they were kind enough to do the port for me. I had tried earlier, under SFU3.0 and vim 6.0, and been able to get the compile to be successful, but had run into a rather nasty bug that caused a core dump. But I' ve tested the current version and it seems to be working fine. Just installed it on my main machine at home, where it will get a thorough workout and it' s doing well so far. Hopefully Mark will be able to put this up shortly here.

Note that it uses Athena widgets. [:' (] And that " make install" didn' t seem to set things _quite_ right, I had to add an " export VIM=<pathtovimroot>" variable into my .profile to get menus to show up. But all that is minor. I' m Sooooo glad to have my multi-level undo and color syntax highlighting back.

Thanks, again, Mark and Rodney!

(in reply to Roger_Telco)
Post #: 6
RE: Building vim 6.2 native for Interix - Jan. 26, '04, 1:15:30 AM   
Roger_Telco

 

Posts: 31
Joined: Jan. 22, '04,
Status: offline
OK, I tried Mark' s suggestion for compiling ... a lot of stuff compiled ok, then I got this shortly after the linking tests:

link.sh: Linked fine with a few libraries removed
cd xxd; CC=" gcc" CFLAGS=" -I/usr/local/include -g -O2" make -f Makefile
c89 -O -DUNIX -o xxd xxd.c
c89: Cannot find compiler ' CL.EXE' in PATH
c89: Either set the C89_COMPILER environment variable or add the
directory that contains the CL.EXE program to PATH
*** Error code 127

Stop.
*** Error code 1

Stop.

I do not have any Microsoft compilers on my system, only the integrated interix gcc (I believe CL.EXE is part of Visual C++?) I bet this is a simple flags issue. Any suggestions?

(in reply to Roger_Telco)
Post #: 7
RE: Building vim 6.2 native for Interix - Jan. 26, '04, 1:20:05 AM   
Roger_Telco

 

Posts: 31
Joined: Jan. 22, '04,
Status: offline
Based on some old newsgroup postings, I set the following variables:
export C89_COMPILER=gcc
export C89_LINKER=gcc (also tried setting to ld)

now running make from src directory says:

melmd@terminus:~/d-drive/interix/build/vim62/src> make
cd xxd; CC=" gcc" CFLAGS=" -I/usr/local/include -g -O2" make -f Makefile
c89 -O -DUNIX -o xxd xxd.c
gcc: /c: No such file or directory
gcc: /IC:\SFU\usr\include: No such file or directory
gcc: /Za: No such file or directory
gcc: /nologo: No such file or directory
gcc: /D__OPENNT: No such file or directory
gcc: /D__INTERIX: No such file or directory
gcc: /U_WIN32: No such file or directory
gcc: /O2: No such file or directory
gcc: /Op: No such file or directory
gcc: /Foxxd.o: No such file or directory
gcc: D:\interix\build\vim62\src\xxd\xxd.c: No such file or directory
gcc: no input files

(in reply to Roger_Telco)
Post #: 8
RE: Building vim 6.2 native for Interix - Jan. 26, '04, 2:07:34 AM   
Rodney

 

Posts: 3729
Joined: Jul. 9, '02,
From: /Tools lab
Status: online
For some reason, I don' t know why, configure has made some decision to try and use c89 which normally, under-the-covers, resolves to the MS VC/C++ compiler/linker.

Things look confused enough at this point that the easiest thing (since no source code needs changing) is to complete remove the working directory (rm -rf) and extract a fresh one and then run configure. But run configure just as Mark specified; don' t have the other options you listed in the first posting.

I suggest this because it looks like the second run of configure didn' t clean-up/correct everything done with the first configure.

(in reply to Roger_Telco)
Post #: 9
RE: Building vim 6.2 native for Interix - Jan. 26, '04, 8:26:36 AM   
Roger_Telco

 

Posts: 31
Joined: Jan. 22, '04,
Status: offline
Latest update:

Per Rodney' s suggestion I tried removing my build directory for vim and untarring clean source from the original vim-6.2.tar.bz2 file.

cd' d to vim62/src, then ran

./configure
make

make runs for several minutes and then ...

link.sh: Linked fine with a few libraries removed
cd xxd; CC=" gcc" CFLAGS=" -I/usr/local/include -g -O2" make -f Makefile
c89 -O -DUNIX -o xxd xxd.c
c89: Cannot find compiler ' CL.EXE' in PATH
c89: Either set the C89_COMPILER environment variable or add the
directory that contains the CL.EXE program to PATH
*** Error code 127

Stop.
*** Error code 1

Stop.

Is there really a dependency on using a Microsoft compiler to compile this? Mark, can you suggest any other flags to try?

(in reply to Roger_Telco)
Post #: 10
RE: Building vim 6.2 native for Interix - Jan. 26, '04, 8:58:18 AM   
steveh

 

Posts: 195
Joined: Jan. 23, '04,
Status: offline
Try running config like:
set -x
CPPFLAGS=" -D_ALL_SOURCE -I/usr/local/include"  \
CXXFLAGS=" -D_ALL_SOURCE -I/usr/local/include"  \
CFLAGS=" -D_ALL_SOURCE -I/usr/local/include"  \
LDFLAGS=" -L/usr/local/lib"  \
./configure --prefix=/usr/local \
--host=intel-pclocal-interix $*


Works here.

(in reply to Roger_Telco)
Post #: 11
RE: Building vim 6.2 native for Interix - Jan. 26, '04, 9:55:45 AM   
markfunk

 

Posts: 673
Joined: Mar. 31, '03,
Status: offline
xxd/xxd.c is a hex dump program. I' m not sure how important it is to vim itself. If you really want to compile it, then type:

cd xxd
make CC=gcc -f Makefile

[ the problem is with how Interix' s make util treats the default rules from the file /usr/share/mk/sys.mk. It shouldn' t be overriding env. values - but it does.
I didn' t notice this problem because I have a MSVC compiler installed so c89 works for me ]

(in reply to Roger_Telco)
Post #: 12
RE: Building vim 6.2 native for Interix - Jan. 26, '04, 10:10:38 AM   
markfunk

 

Posts: 673
Joined: Mar. 31, '03,
Status: offline
FYI:

cc and c89 are only for use as a front end to MS C compilers. The value for C89_COMPILER variable can only be a pathname to a MS compiler.

(in reply to Roger_Telco)
Post #: 13
RE: Building vim 6.2 native for Interix - Jan. 26, '04, 9:58:43 PM   
Roger_Telco

 

Posts: 31
Joined: Jan. 22, '04,
Status: offline
Aha! That last suggestion did the trick. To recap all the suggestions from this topic, here' s what finally worked:

1. Unpack source from vim-6.2.tar.bz2, eg., to directory ~/build/vim62.
2. cd ~/build/vim62/src
3. ./configure
4. cd ~/build/vim62/src/xxd
5. make CC=gcc -f Makefile
6. cd ~/build/vim62/src
7. make
8. su to Administrator and make install
9. run vim and celebrate!

Thanks to all who helped out!

(in reply to Roger_Telco)
Post #: 14
RE: Building vim 6.2 native for Interix - Jan. 30, '04, 1:20:49 PM   
Chinh

 

Posts: 6
Joined: Aug. 19, '03,
Status: offline
Hello everyone,

Pardon the seemingly stupid question, but I am new to this make process. In the last message from Roger detailing the process that you generate the Interix native compiled code for vim, Roger mentioned the configure command. Where is this command or is it a script that you generated somewhere which has other commands in it. Would someone care to explain in detail what this configure command or script entails to?

Thanks in advance for the answer. I have been trying to figure out a way to make the vim executable native to the Interix system so that I don' t have to run the Windows version.

Best Regards,

Chinh Nguyen

(in reply to Roger_Telco)
Post #: 15
RE: Building vim 6.2 native for Interix - Jan. 30, '04, 1:31:28 PM   
markfunk

 

Posts: 673
Joined: Mar. 31, '03,
Status: offline
Well, if you followed the directions and got the vim source code, you' d see there was a " configure" file there.
It is a shell script that tries to figure out the capabilities of your system and generates a config.h file with the results.
The vim source code has been written to use this config.h file and work around the varying system features.

The folks that implement vim created this ' configure' file.

(in reply to Roger_Telco)
Post #: 16
RE: Building vim 6.2 native for Interix - Jan. 30, '04, 2:51:14 PM   
Chinh

 

Posts: 6
Joined: Aug. 19, '03,
Status: offline
Mark,

Thanks for the reply. I redownload the source package from vim.org. And yes, there is the configure script there. I don' t remember where I got the other source.

Now, the next problem I ran into is when I tried to run the configure script, it came back with the following error:

Checking whether the C compiler (gcc ) work... no
configure: error: Installation or configuration problem: C compiler cannot create executables.

The gcc was installed during the SFU package installation. I did not do or change anything.

Any suggestion on how to fix this error?

Thanks.

Chinh Nguyen

(in reply to Roger_Telco)
Post #: 17
RE: Building vim 6.2 native for Interix - Jan. 30, '04, 3:11:35 PM   
markfunk

 

Posts: 673
Joined: Mar. 31, '03,
Status: offline
Have you tried running gcc ? Does it work ?
Test that first.
Then go look at the configure script and try to figure out what its doing at the time that it prints that error message. Once you can reproduce the problem manually, then you can figure out what' s wrong.

(in reply to Roger_Telco)
Post #: 18
RE: Building vim 6.2 native for Interix - Jan. 30, '04, 3:23:29 PM   
Chinh

 

Posts: 6
Joined: Aug. 19, '03,
Status: offline
No, the gcc by itself does not go through. Here are the error message when gcc tried to link to the libraries:

/usr/lib/libc.so.3.5: undefined reference to ' _beThreadSafe`
/usr/lib/libc.so.3.5: undefine reference to ' _vfsLineBuf_key'

(in reply to markfunk)
Post #: 19
RE: Building vim 6.2 native for Interix - Jan. 30, '04, 4:03:35 PM   
markfunk

 

Posts: 673
Joined: Mar. 31, '03,
Status: offline
looks like you' ve got a bad install.
You need to have selected all the Base Utilities
and all the Interix components (including GNU and SDK)

(in reply to Roger_Telco)
Post #: 20
Page:   [1]
All Forums >> [SFU / Interix / SUA Technology] >> Tools Discussion Forum >> Building vim 6.2 native for Interix Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Search All Forums -

Advanced search


SPONSORS



Forum Software © ASPPlayground.NET Advanced Edition 2.5 ANSI

0.063