# need help building sct in i386 with Clang



## agpe (Feb 21, 2018)

Hi there,

I've been compiling* sct *to change color temperature in x86_64 without problems with this command:


```
# cd /tmp && su user -c "wget --no-check-certificate \
> https://www.tedunangst.com/flak/files/sct.c" && \
> su user -c "cc -std=c99 -O2 -I /usr/local/include/ -o sct sct.c -L /usr/local/lib/ -lm \
> -lX11 -lXrandr" && su user -c "mv sct ~user/bin/sct"
```

Is this correct?

However, this builds in i386 too, but it doesn't work *without error reports*. *When run it does nothing.*
In x86_64 works absolutely fine.

Do I have to put some special flag to clang in my i386 computer? I don't have to much control in terms of building with clang.

Thank you in advance,


----------



## SirDice (Feb 21, 2018)

Why don't you simply install accessibility/sct?


----------



## agpe (Feb 21, 2018)

I didn't know there was a port for accessibility/sct. I was looking for a pkg and I didn't find it. 
I will try the port. However, I don't understand where is the problem with i386. Tell me if you know.

Thank you very much.


----------



## SirDice (Feb 21, 2018)

If there's a port there's usually also a package, unless there's something blocking the creation of a package (license for example).


```
To add the package: pkg install sct
```

So, just run `pkg install sct`.


----------



## agpe (Feb 21, 2018)

In this case:


```
pkg: No packages available to install matching 'sct' have been found in the repositories
```

There should be a reason why clang isn't working properly in i386 in this case, Could be has the .c program been written only for x86_64 archs?


----------



## agpe (Feb 21, 2018)

When installing accessibility/sct I obtain the same results. Builds fine and executes without warnings or core dumps but no changes are made to the display.

I don't know if it's a problem of my specific video driver, or a problem with the i386 arch.


----------

