FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour SSE2 instruction set problem
Posts: 5
Joined: Sat Jan 06, 2018 11:58 AM
SSE2 instruction set problem
Posted: Mon Mar 19, 2018 09:24 AM
Hello!

We have an application, that uses FiveWin, but it can not be executed on specific computers.
We found the source of the problem: the applications assembly code contains commands of SSE2 instruction set, so it can not be executed on CPUs, that doesn't support SSE2 instruction set.

(Pictures of our application's assembly code)




We found the code, that is in the hbvm.lib.
This file is part of the Harbour package, that we've got when we've purchased FiveWin.

(Picture of hbvm.lib file)


We would like to rebuild these Harbour lib files, so that they will not contain commands of SSE/SSE2 instruction sets.
The Visual Studio compiler have a cl.exe option: /arch, that could be used (https://msdn.microsoft.com/en-us/library/7t5yh4fd.aspx),
but we haven't got the source of the Harbour lib files, that we got with the FiveWin package.


Can we have a new compilation of the Harbour lib files, without SSE/SSE2 instruction set command?


(We use FWH 17.11, with Harbour 3.2.)
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: SSE2 instruction set problem
Posted: Mon Mar 19, 2018 09:59 AM
Joszif,

The Harbour sources are available from here:
https://github.com/harbour/core

What C compiler are you using to build your apps ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 5
Joined: Sat Jan 06, 2018 11:58 AM
Re: SSE2 instruction set problem
Posted: Mon Mar 19, 2018 12:14 PM

Dear Antonio,

We use Visual Studio 2017 compiler (Exact version: 19.11.25547 for x86).

When we purchased FiveWin, we got compiled Harbour lib files, in a zip file, named Harbour_vsc2017_32bits_20170325.zip.
This zip contains every Harbour lib files, including the hbvm.lib file that we mentioned in the previous post.

The Harbour version that can be downloaded from the official site, was not good for us, because it threw the following linker error:
error LNK2038: mismatch detected for '_MSC_VER': value '1600' doesn't match value '1900' in [filename].OBJ.

I think the solution is a new Harbour_vsc2017_32bits_20170325.zip that is made by using /arch compiler option.

What do you think about it?

Thank you,

Joszif

Posts: 375
Joined: Tue Feb 10, 2015 09:48 AM
Re: SSE2 instruction set problem
Posted: Mon Mar 19, 2018 01:17 PM

I think your only possibility is download and compile harbour yourself, with visual studio it is pretty simple: start the "developer-command-prompt" and run "win-make.exe" in the harbour root.
In your case you must modify the file config\win\msvc.mk where sets up th CFLAGS and/or the LDFLAGS
Just for curiosity, which processor your program needs to run on? the SS2 is from 2000, and now they are in every system...

Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: SSE2 instruction set problem
Posted: Mon Mar 19, 2018 06:43 PM

Joszif,

> error LNK2038: mismatch detected for '_MSC_VER': value '1600' doesn't match value '1900' in [filename].OBJ.

Please copy here the complete error. I don't find any filename.* file in the harbour sources

> I think the solution is a new Harbour_vsc2017_32bits_20170325.zip that is made by using /arch compiler option.

You call pull the Harbour sources from 2017/03/25 from Github

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 5
Joined: Sat Jan 06, 2018 11:58 AM
Re: SSE2 instruction set problem
Posted: Tue Mar 20, 2018 02:51 PM

Hello,

Thank you for your help, the problem has been solved.

We downloaded the Harbour core from github as Antonio suggested and then we rebuilt the source as AntonioP suggested.
These newly created lib files don't contain SSE2 specific commands.

Anyway, there are computers in our network that has old, mostly AMD processors, that don't support SSE2.

Thank you for your help!

Joszif

Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: SSE2 instruction set problem
Posted: Tue Mar 20, 2018 07:13 PM

Joszif,

Glad to know that you solved it :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion